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
test.py: note: In member "__init__" of class "Foo":
test.py:2: note: Missing return statement
test.py: note: In member "increment_x" of class "Foo":
test.py:4: note: Missing return statement
The text was updated successfully, but these errors were encountered:
This is just a bug caused by the fact that --strict-optional changes the meaning of returning None internally in mypy. It works fine without --strict-optional.
rowillia
changed the title
--warn-no-return Warns about functions that have no return statements
--warn-no-return Warns about functions that have no return statements if used in tandem with --strict-optional
Oct 28, 2016
Got it. Thanks @rwbarton for figuring out what I meant even though I forgot to specify what my flags were. Changed the title to reflect the actual problem.
UPDATED - This problem appears to happen when
--warn-no-return
is used in tandem with--strict-optional
test.py:
mypy -s --fast-parser --warn-no-return --strict-optional test.py
The text was updated successfully, but these errors were encountered: