Mostly PEP 585 and PEP 604. I keep wanting to do this every time I edit a file, so might as well get it all out of the way before working on other stuff.
Replacing Optional[x] with x | None is a little picky, but all else being equal, I think it's better to have one less import. (The from __future__ import annotations imports should no longer be necessary whenever pyspacer's minimum version is bumped far enough; I believe it's 3.9 for PEP 585, 3.10 for PEP 604.)
Mostly PEP 585 and PEP 604. I keep wanting to do this every time I edit a file, so might as well get it all out of the way before working on other stuff.
Replacing
Optional[x]
withx | None
is a little picky, but all else being equal, I think it's better to have one less import. (Thefrom __future__ import annotations
imports should no longer be necessary whenever pyspacer's minimum version is bumped far enough; I believe it's 3.9 for PEP 585, 3.10 for PEP 604.)