You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix for FAST002 is marked as always unsafe, but there isn't a ## Fix safety section in the documentation explaining why it is marked as unsafe.
I can think of an obvious reason why the fix might be unsafe on Python 3.8 and lower: the fix adds imports of typing_extensions on Python 3.8 and lower, while the user's code might not have typing_extensions listed as a dependency. However, it's not immediately obvious to me (as a non-expert when it comes to fastAPI) what the exact reasons are for the fix being marked as unsafe on Python 3.9+.
It would be great to add better docs here. Cc. @TomerBin, who implemented the rule in #11579 and @charliermarsh, who merged it.
The text was updated successfully, but these errors were encountered:
At the time it was merged, we weren't handling defaults correctly. If I remember correctly, an improvement was deployed later so we need to check if it's still the case.
This is the relevant fix #13133
The fix for FAST002 is marked as always unsafe, but there isn't a
## Fix safety
section in the documentation explaining why it is marked as unsafe.I can think of an obvious reason why the fix might be unsafe on Python 3.8 and lower: the fix adds imports of
typing_extensions
on Python 3.8 and lower, while the user's code might not havetyping_extensions
listed as a dependency. However, it's not immediately obvious to me (as a non-expert when it comes tofastAPI
) what the exact reasons are for the fix being marked as unsafe on Python 3.9+.It would be great to add better docs here. Cc. @TomerBin, who implemented the rule in #11579 and @charliermarsh, who merged it.
The text was updated successfully, but these errors were encountered: