We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 271b97e commit 8ad05e4Copy full SHA for 8ad05e4
1 file changed
src/marshmallow_sqlalchemy/convert.py
@@ -3,12 +3,11 @@
3
import functools
4
import inspect
5
import uuid
6
+from collections.abc import Callable
7
from typing import (
8
TYPE_CHECKING,
9
Any,
- Callable,
10
Literal,
11
- Union,
12
cast,
13
overload,
14
)
@@ -17,7 +16,7 @@
17
16
try:
18
from typing import TypeAlias, TypeGuard
19
except ImportError:
20
- from typing_extensions import TypeAlias, TypeGuard
+ from typing import TypeAlias, TypeGuard
21
22
import marshmallow as ma
23
import sqlalchemy as sa
@@ -40,7 +39,7 @@
40
39
_FieldPartial: TypeAlias = Callable[[], fields.Field]
41
# TODO: Use more specific type for second argument
42
_FieldClassFactory: TypeAlias = Callable[
43
- ["ModelConverter", Any], Union[type[fields.Field], _FieldPartial]
+ ["ModelConverter", Any], type[fields.Field] | _FieldPartial
44
]
45
46
0 commit comments