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
{{ message }}
Repository navigation
Use first super() argument as the target type #3926
Currently mypy ignores the type that the first super() argument refers to -- it assumes that it always refers to the enclosing class. This is incorrect. For example, here mypy generates a false negative:
classA:
deff(self) ->None: passclassB(A):
defg(self) ->None:
super(A, self).f() # No error though this will fail at runtimeB().g() # Runtime error
Once we have this, it should be easy to also support the 2-argument form of super() outside class definitions.
Activity
ilevkivskyi commentedon Oct 18, 2019
Now mypy correctly gives an error here.