False positive with warn-unreachable
and no-strict-optional
#16787
Labels
bug
mypy got something wrong
warn-unreachable
and no-strict-optional
#16787
Bug Report
Mypy warns that a line is unreachable, when it actually is reachable. I don't think this is a Typeshed issue given the typing looks fine there.
To Reproduce
Mypy playground. Repeated here for convenience:
Expected Behavior
No Mypy errors
Actual Behavior
Says the print statement is unreachable, yet if you execute the code, it'll hit the print line.
Your Environment
--no-strict-optional
,--warn-unreachable
The text was updated successfully, but these errors were encountered: