Skip to content

Improve docs on fix safety for FAST002 #14484

@AlexWaygood

Description

@AlexWaygood

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions