♻️ Import Literal from the typing module directly (#1699)

import Literal from typing now that Python 3.8 is dropped
This commit is contained in:
Sofie Van Landeghem
2026-01-13 12:30:07 +01:00
committed by GitHub
parent ac29fcdf9c
commit 99d8b0bba2
3 changed files with 4 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ from typing import (
Any,
Callable,
ClassVar,
Literal,
Optional,
TypeVar,
Union,
@@ -48,7 +49,7 @@ from sqlalchemy.orm.decl_api import DeclarativeMeta
from sqlalchemy.orm.instrumentation import is_instrumented
from sqlalchemy.sql.schema import MetaData
from sqlalchemy.sql.sqltypes import LargeBinary, Time, Uuid
from typing_extensions import Literal, TypeAlias, deprecated, get_origin
from typing_extensions import TypeAlias, deprecated, get_origin
from ._compat import ( # type: ignore[attr-defined]
PYDANTIC_MINOR_VERSION,

View File

@@ -1,6 +1,7 @@
from collections.abc import Iterable, Mapping, Sequence
from typing import (
Any,
Literal,
Optional,
TypeVar,
Union,
@@ -34,7 +35,6 @@ from sqlalchemy.sql.elements import (
UnaryExpression,
)
from sqlalchemy.sql.type_api import TypeEngine
from typing_extensions import Literal
from ._expression_select_cls import Select as Select
from ._expression_select_cls import SelectOfScalar as SelectOfScalar