Replies: 1 comment
-
On mypy master, we've modified heuristics to complain about this. See: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently it's possible to write a function that has a non-
None
return type but returns None, e.g:This is considered fine by mypy, but will cause type-related problems at runtime:
Why does mypy allow these functions?
Beta Was this translation helpful? Give feedback.
All reactions