Closed
Description
Steps to reproduce
mypy doesn't detect the need for a forward declaration. For example:
class Foo:
def bar(o: Foo) -> None:
print('bar called')
o = Foo()
o.bar()
Current behavior
mypy doesn't detect anything wrong with the above code.
Expected behavior
mypy should flag the reference to "Foo" on line 2 as being undefined.
mypy --version output
mypy 0.570
Metadata
Metadata
Assignees
Labels
No labels