Since granain supports >=3.10, use of the generic typing aliases is unnecessary (and they are deprecated, see "historical and deprecated features"). e.g. typing.Tuple should just be tuple from 3.10 onwards.
It's tedious to update this all manually, so I suggest enabling the ruff lint rules for pyupgrade to handle this automatically and check it going forward:
# pyproject.toml
...
[tool.ruff]
line-length = 120
extend-select = [
...
'W', # pycodestyle
+ 'UP', # pyupgrade
]