Cleanup codebase with `pyupgrade` (Part 2)
I split these out of the original MR because 1) that was pretty long as it was, and 2) maybe some of these are controversial. Hopefully it can be taken as-is, and then we can wire pyupgrade
up in the code checker to keep modern syntax, as it makes no additional changes after this MR. It'll also be useful in the future when needing to update type annotations like Tuple
-> tuple
, and Optional[Foo]
-> Foo|None
when py3.8 and 3.9 are dropped.