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.
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 | NoneoverOptional[X](3.10+, PEP 604) (Upgrade to Python 3.10 using pyupgrade #144)def one[T](items: list[T]) -> T:, (3.12+, PEP 695) (Use PEP 695 generics #204)