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
Mypy doesn't complain about redefining an attribute in a subclass with a narrower type. I expect the following code to produce a static type checking error:
classA:
f: objectclassB(A):
f: float
Since this will fail:
b=B()
a: A=ba.f="abc"b.f.is_integer()
Your Environment
Mypy version used: 0.960
Mypy configuration options: strict=true
Python version used: 3.10
The text was updated successfully, but these errors were encountered:
Bug Report
Mypy doesn't complain about redefining an attribute in a subclass with a narrower type. I expect the following code to produce a static type checking error:
Since this will fail:
Your Environment
0.960
strict=true
3.10
The text was updated successfully, but these errors were encountered: