typing.Annotated should be considered a dangerous default #10093
Labels
Needs specification 🔐
Accepted as a potential improvement, and needs to specify edge cases, message names, etc.
Proposal 📨
Current problem
If a programmer accidentally uses
typing.Annotated
as a default value (not as a default type), pylint doesn't complain.Ex, you're converting some FastAPI code from plain Depends to Annotated and make a typo, like below:
Original:
Brainfart:
What you're actually supposed to do:
Desired solution
PyLint should make me feel bad about myself for making this typo. /s
The text was updated successfully, but these errors were encountered: