I'm a little confuse how I'm supposed to type a base class abstract method?
In this case my base class only requires that the inheriting class implements a method named 'learn' that returns None without mandating any arguments.
class MyBaseClass(ABC):
@abstractmethod
def learn(self, *args, **kwargs) -> None:
raise NotImplementedError()
but if I implement it mypy raise en error 'Signature of "learn" incompatible with supertype "MyBaseClass"'
class MyOtherClass(MyBaseClass):
def learn(self, alpha=0.0, beta=1) -> None:
# do something
return None
So how should I declare the learn method in the base class?