-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(🐞) 'warn-unreachable' doesn't reactivate after it is suppressed with a <nothing>
statement
#11437
Comments
Looks like this is intentional: https://github.com/python/mypy/blame/5703becbbe9be5006ed0d2d998dd4a793f1aedd0/test-data/unit/check-unreachable-code.test#L905 It can be easily changed, but I am not sure that this won't break a lot of existing code. |
NoReturn
functions are called<nothing>
statement
topic-reachability
|
It appears that the latest version of mypy (1.5) behaves as expected here, so I think this is safe to close. |
Likely fixed by #15386 |
The first call to
foo
is suppress theunreachable
intentionally, (same with the second). But theprint("hi)
should definitely show an unreachable error.The text was updated successfully, but these errors were encountered: