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
As we drop support for older versions of Python, newer typing options become available. This task tracks all of these possible improvements, including ones we can not yet implement because we support older versions of Python.
mx-moth
changed the title
Replace typing.List[int]-style generics with PEP 585 list[int] generics
Update typing annotations to track latest practice
Jan 11, 2024
Python does not appear to be heading in this direction and is
considering other approaches to annotations. This future import is
dropped so that we stop relying on a feature that may not come to pass.
See also #109, https://peps.python.org/pep-0649/
Python does not appear to be heading in this direction and is
considering other approaches to annotations. This future import is
dropped so that we stop relying on a feature that may not come to pass.
See also #109, https://peps.python.org/pep-0649/
As we drop support for older versions of Python, newer typing options become available. This task tracks all of these possible improvements, including ones we can not yet implement because we support older versions of Python.
from __future__ import annotations
(Use Python 3.9 typing features #127)Union[X, Y]
withX | Y
(3.10+, PEP 604) (Upgrade to Python 3.10 using pyupgrade #144)X | None
overOptional[X]
(3.10+, PEP 604) (Upgrade to Python 3.10 using pyupgrade #144)def one[T](items: list[T]) -> T:
, (3.12+, PEP 695)The text was updated successfully, but these errors were encountered: