You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a pipe to create a type alias error: Type application has too many types (1 expected) is raised. This is not the case if you use a Union.
To Reproduce/Actual Behavior
fromtypingimportUniontype_alias1=tuple[int, int, int] |int# error: Type application has too many types (1 expected)type_alias2=Union[tuple[int, int, int], int] # passes type check
My Environment
Mypy versions used: 0.960+dev.10ba5c1aa14e01be1cfacb322136e22751617d26, and 0.942
Python version used: Python 3.10.2
Operating system and version: Windows 10 Home (21H2)
The text was updated successfully, but these errors were encountered:
tayler6000
changed the title
false positive "error: Type application has too many types (1 expected)" when using pipe instead of Union for TypeAlias..
false positive "error: Type application has too many types (1 expected)" when using pipe instead of Union for type alias.
Apr 16, 2022
Bug Report
When using a pipe to create a type alias
error: Type application has too many types (1 expected)
is raised. This is not the case if you use a Union.To Reproduce/Actual Behavior
My Environment
The text was updated successfully, but these errors were encountered: