Closed
Description
Assume m.pyi
like this:
from typing import Tuple
a = ... # type: A
class A(Tuple[int, str]): ...
Now this error isn't caught by mypy:
from m import a
a[0]()
This is caused by the class definition being after the type reference in m.pyi
. Apparently tuple item types don't get propagated because the class hasn't been semantically analyzed yet when binding the type.