-
Notifications
You must be signed in to change notification settings - Fork 289
Closed
Labels
Description
The following example results in the bug AttributeError: 'UnionType' object has no attribute 'name' when run through pytd. This is from most recent pytype from pip
from typing import Union, IO, AnyStr
from typing_extensions import Literal
_Data = Union[IO[AnyStr]]
def func(param: _Data[str]) -> None: ...This is a minimal case that doesn't use the TypeVar nature of _Data, but for example it could be declared as (param: _Data[AnyStr]) -> AnyStr, which at the very least shouldn't error, even if the types aren't fully inferred.