Not planned
Description
Bug Report
I'm not sure if this is related to #12211, but I have this simple example:
from typing import Tuple, TypeAlias
class Foo:
...
_A: TypeAlias = Foo | None | Tuple[str, str]
_B: TypeAlias = Foo | None | tuple[str, str]
_C = Foo | None | Tuple[str, str]
_D = Foo | None | tuple[str, str]
...which fails.
To Reproduce
Run the above using mypy --strict alias.py
.
I tried both 0.961 and 0.970-dev using Python 3.10.5. I get these errors:
$ mypy --strict alias.py
alias.py:9: error: Type application has too many types (1 expected)
alias.py:11: error: Type application has too many types (1 expected)
Found 2 errors in 1 file (checked 1 source file)
Your Environment
This was run on Ubuntu 22.04, Python 3.10.5, and mypy 0.961 and 0.970-dev
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
AlexWaygood commentedon Jun 12, 2022
Duplicate of #11098
TypeAlias
with new union syntax (PEP 604) #11098