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
This is my very first time opening an Issue on GitHub, so don't be too harsh if I'm doing it wrong since I'm not really used to the conventions here ;)
Are you reporting a bug, or opening a feature request?
Bug
Please insert below the code you are checking with mypy
What is the actual behavior/output?
Output: mypy_test.py:12: error: Cannot determine type of '_x'
Everything works fine, if isinstance(value, numbers.Integral) is removed.
What is the behavior/output you expect?
No error
What are the versions of mypy and Python you are using?
mypy 0.701
Python 3.7.2
What are the mypy flags you are using? (For example --strict-optional)
No flags at all.
The text was updated successfully, but these errors were encountered:
Athazo
changed the title
Error "Cannot determine type of ..." of property
Error "Cannot determine type of ..." of instance attribute with isinstance() check
May 17, 2019
Hm, this is pretty bad. The problem is that mypy believes that int and numbers.Integral are non-overlapping, so the branch is unreachable. So essentially this is a duplicate of #3603 (already high priority).
See also #2636 for the discussion about numeric tower.
This is my very first time opening an Issue on GitHub, so don't be too harsh if I'm doing it wrong since I'm not really used to the conventions here ;)
Are you reporting a bug, or opening a feature request?
Bug
Please insert below the code you are checking with mypy
Edit: Simpler example, removed the property, still getting the same error:
What is the actual behavior/output?
Output:
mypy_test.py:12: error: Cannot determine type of '_x'
Everything works fine, if
isinstance(value, numbers.Integral)
is removed.What is the behavior/output you expect?
No error
What are the versions of mypy and Python you are using?
mypy 0.701
Python 3.7.2
What are the mypy flags you are using? (For example --strict-optional)
No flags at all.
The text was updated successfully, but these errors were encountered: