How do I make sure that a method implementing an abstract method adheres to the python static type checks. Is there a way in pycharm to get an error if the return type is incorrect for the implemented method?
class Dog:
@abc.abstractmethod
def bark(self) -> str:
raise NotImplementedError("A dog must bark")
class Chihuahua(Dog):
def bark(self):
return 123
So for the above code I would want to get some sort of a hint that there is something wrong with my chihuahua