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
When using multiple inheritance, the type checker does not complain if base classes have incompatible definitions. For example, this is not rejected:
import typing
class A:
def f(self, x: int) -> None: pass
class B:
def f(self, x: str) -> None: pass
class C(A, B): pass # No error, but should complain about f
Verify that all inherited definitions are compatible.
Activity
JukkaL commentedon Jul 15, 2013
Related test case:
testMethodNameCollisionInMultipleInheritanceWithIncompatibleSigs-skipincheck-multiple-inheritance.test.JukkaL commentedon Apr 26, 2016
Mypy now complains about this -- seems to work.