Draft: Update typechecking to Python 3.12
These are all mechanical edits that transform the type annotations to use builtins, which was added to Python in version 3.10.
These are all mechanical edits that transform the type annotations to use builtins, which was added to Python in version 3.10.