Closed
Description
It seems mypy has trouble with generated classes such as NamedTuple.
a.py:
import b
from typing import Any, NamedTuple
class A:
def a(self, b: 'b.B') -> str:
return 'a'
ATuple = NamedTuple('ATuple', [('a', Any)])
b.py:
import a
class B:
def b(self, a: 'a.A') -> str:
return 'b'
def aWithTuple(self, atuple: 'a.ATuple') -> str:
return 'a'
mypy a.py
output
a.py:1: note: In module imported here:
b.py: note: In function "aWithTuple":
b.py:7: error: Invalid type "a.ATuple"
mypy b.py
works just fine