Closed deepyaman closed 2 weeks ago
We actually rely on runtime typing and if we not use the right annotation we immediately break 3.9 support which we actually test against.
We actually rely on runtime typing and if we not use the right annotation we immediately break 3.9 support which we actually test against.
Like what, for example? All this does is automatically perform PEP 585 (List[int]
-> list[int]
) and PEP 604 (Union[str, int]
-> str | int
) rewrites; see https://docs.astral.sh/ruff/settings/#lintpyupgrade.
Thanks!
We actually rely on runtime typing and if we not use the right annotation we immediately break 3.9 support which we actually test against.
Never mind, I was thinking of the following error from 3.8:
Python 3.8.19 | packaged by conda-forge | (default, Mar 20 2024, 12:49:57)
[Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> list[int]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'type' object is not subscriptable
Description of changes