The [unreachable]
check fails for module scope code and allows unreachable raising of Exceptions
#11331
Labels
bug
mypy got something wrong
Bug Report
There are seemingly trivial cases of unreachable code not being detected at module level, or when the code consists of
raise
statements.To Reproduce
Expected Behavior
As seen in my example, I would expect the optional
[unreachable]
check to detect the following examples of unreachable code:NoReturn
callable being called.Actual Behavior
The example above type checks with
warn_unreachable = True
.Your Environment
0.910
mypy.ini
(and other config files):3.8.10
Ubuntu 21.04
The text was updated successfully, but these errors were encountered: