Closed
Description
class Base:
def __new__(cls):
return 42
def get(self) -> str:
return 'hello'
class Child(Base):
pass
print(Child())
print(Child().get())
This code obviously will fail at runtime:
42
Traceback (most recent call last):
File "/tmp/qwe2.py", line 13, in <module>
print(Child().get())
AttributeError: 'int' object has no attribute 'get'
But MyPy sees nothing wrong.