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.
[x] Replace all typing.List, Set, Dict, Tuple, etc mentions with their plain counterparts (3.9+, PEP 585) (#127)
[x] Stop using from __future__ import annotations (#127)
[x] Replace all Union[X, Y] with X | Y (3.10+, PEP 604) (#144)
[x] Use X | None over Optional[X] (3.10+, PEP 604) (#144)
[ ] Use generic type parameters def one[T](items: list[T]) -> T:, PEP 695
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
(#127)Union[X, Y]
withX | Y
(3.10+, PEP 604) (#144)X | None
overOptional[X]
(3.10+, PEP 604) (#144)def one[T](items: list[T]) -> T:
, PEP 695