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
Are you reporting a bug, or opening a feature request?
A bug
Please insert below the code you are checking with mypy,
throw = None
for i in range(0, 2):
if i == 1:
if throw is None:
raise Exception(2)
print("I reached")
throw = True
What is the actual behavior/output?
organization/task/kk.py:6: error: Statement is unreachable [misc]
What is the behavior/output you expect?
No error, since line 6 is reached when executing the code
What are the versions of mypy and Python you are using?
mypy 0.761 and python 3.7.5.
Also fails with mypy from Git master?
What are the mypy flags you are using? (For example --strict-optional)
--warn-unreachable
Mypy does not cause false positive when typing the flag "throw"
from typing import Optional
throw: Optional[bool] = None
for i in range(0, 2):
if i == 1:
if throw is None:
raise Exception(2)
print("I reached")
throw = True
The text was updated successfully, but these errors were encountered:
Are you reporting a bug, or opening a feature request?
A bug
Please insert below the code you are checking with mypy,
What is the behavior/output you expect?
No error, since line 6 is reached when executing the code
What are the versions of mypy and Python you are using?
mypy 0.761 and python 3.7.5.
Also fails with mypy from Git master?
What are the mypy flags you are using? (For example --strict-optional)
--warn-unreachable
Mypy does not cause false positive when typing the flag "throw"
The text was updated successfully, but these errors were encountered: