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
One of the more surprising mypy features is that is doesn't type check functions without annotations (see #6643 for an example). New users are particularly likely to hit this issue, but it's generally easy to forget to annotate functions, especially those that don't take any arguments. Maybe we should type check all function bodies by default, and provide an option to fall back to the current behavior. We've made this behavior quite prominent in the documentation, but it still seems to confuse many users.
We'd probably want to reduce the number of false positives before making the switch, but this is something the mypy core team is planning to work on anyway. It may be useful to try to infer the return type automatically as well for this to provide the most benefits.
Thoughts?
The text was updated successfully, but these errors were encountered:
One of the more surprising mypy features is that is doesn't type check functions without annotations (see #6643 for an example). New users are particularly likely to hit this issue, but it's generally easy to forget to annotate functions, especially those that don't take any arguments. Maybe we should type check all function bodies by default, and provide an option to fall back to the current behavior. We've made this behavior quite prominent in the documentation, but it still seems to confuse many users.
We'd probably want to reduce the number of false positives before making the switch, but this is something the mypy core team is planning to work on anyway. It may be useful to try to infer the return type automatically as well for this to provide the most benefits.
Thoughts?
The text was updated successfully, but these errors were encountered: