-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
project: feature trackerTracks whether a typing feature can be used in typeshed stubsTracks whether a typing feature can be used in typeshed stubs
Description
This issue is supposed to track when we can start to use the pipe character as union (PEP 604) in typeshed. Support is needed in released versions of:
- mypy (Support PEP 604 - union types as X | Y mypy#9610), mostly works, except (full list of related issues here):
- Type aliases (3.10 union operator ( | ) doesn't work in subscripts when creating type aliases mypy#10901)
- False-positive errors when using
type[T]
(orType[T]
) in a PEP 604 type alias mypy#12392 - False-positive error when using
Callable
in a PEP 604 type alias mypy#12393 - (🐞) False positive "error: Type application has too many types (1 expected)" on tuple when annotated as a type or in a
TypeAlias
with new union syntax (PEP 604) mypy#11098 - False-positive error when using
Callable
in a PEP 604 type alias in a stub file with--python-version=3.9
mypy#14158
- pytype (Add support for PEP 604 (Union |) in stub files google/pytype#924)
- pyright (Implement PEP 604 microsoft/pyright#659)
- pyre
- PyCharm (PY-44974)
Metadata
Metadata
Assignees
Labels
project: feature trackerTracks whether a typing feature can be used in typeshed stubsTracks whether a typing feature can be used in typeshed stubs