Open
Description
Hi, first of all thanks for this amazing library!
I have a problem though, when using interfaces with typed arguments. As I understand it, if a function accept argument of class A, if B inherits from A, it should also be accepted.
But when I try this code
from interface import Interface, implements
class A:
pass
class B(A):
pass
class I(Interface):
def my_func(self, a: A):
pass
class C(implements(I)):
def my_func(self, a: B):
pass
it throws this error
interface.interface.InvalidImplementation:
class C failed to implement interface I:
The following methods of I were implemented with invalid signatures:
- my_func(self, a: __main__.B) != my_func(self, a: __main__.A)