Mypy: Not warning if return type is incorrect

Viewed 26

I am not sure if it is a setup issue or mypy is corrupted in my machine. I have a below class,

class A:
   _b: B

   @property
   def b(self) -> C:
      return self._b

I expect mypy to complain incorrect return type but I get no errors found. Is this expected?

0 Answers
Related