Replaced importing the "typing" module as "t" with importing the individual names in the "typing" module. Since Python 3.9 introduced type hinting generics in standard collections, we do not have as many names to import now. This is also to be consistent with the practices of most major and standard packages and examples.

This commit is contained in:
2023-04-26 18:22:45 +08:00
parent ee5b447c23
commit cda9e4e3c6
25 changed files with 116 additions and 113 deletions

View File

@ -17,7 +17,7 @@
"""The SQLAlchemy alias for the offset items.
"""
import typing as t
from typing import Any
import sqlalchemy as sa
@ -30,10 +30,10 @@ def offset_alias() -> sa.Alias:
:return: The SQLAlchemy alias for the offset items.
"""
def as_from(model_cls: t.Any) -> sa.FromClause:
def as_from(model_cls: Any) -> sa.FromClause:
return model_cls
def as_alias(alias: t.Any) -> sa.Alias:
def as_alias(alias: Any) -> sa.Alias:
return alias
return as_alias(sa.alias(as_from(JournalEntryLineItem), name="offset"))