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
Currently mypy will prefer __init__ to __new__ for determining
the signature of a type object if there exists any __init__
other than object's.
Instead, prefer the closest definition in the MRO, so that
subclass __new__ can override parent __init__.
Fixes#1435.
Currently mypy will prefer __init__ to __new__ for determining
the signature of a type object if there exists any __init__
other than object's.
Instead, prefer the closest definition in the MRO, so that
subclass __new__ can override parent __init__.
Fixes#1435.
Mypy complains about the program even though it's valid Python:
It seems that mypy uses
__init__
and doesn't recognize that__new__
in a subclass should take precedence.The text was updated successfully, but these errors were encountered: