Closed
Description
Run mypy 0.550 on the following code
from typing import NamedTuple, Type, cast
class A(NamedTuple): ...
A1: Type[A] = A # no error
A2: Type[A] = A # error: Unsupported type Type["A"]
A2()
def j(cls: Type[A]) -> None: # error: Unsupported type Type["A"]
cls()
class B(): ... # no error
B1: Type[B] = B
B1()
I see error: Unsupported type Type["A"]
on the lines for A2
and def j
, but not in other places, as indicated.
I'm probably hitting an edge case for NamedTuple
here.