Skip to content

Commit 4276976

Browse files
fix #1598: pyright error on Field import due to partially unknown types
1 parent 4357091 commit 4276976

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sqlmodel/main.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@
6161
PYDANTIC_MINOR_VERSION,
6262
BaseConfig,
6363
ModelField,
64-
ModelMetaclass,
65-
Representation,
6664
SQLModelConfig,
67-
Undefined,
68-
UndefinedType,
6965
_calculate_keys,
7066
finish_init,
7167
get_annotations,
@@ -89,6 +85,8 @@
8985
from pydantic._internal._repr import Representation as Representation
9086
from pydantic_core import PydanticUndefined as Undefined
9187
from pydantic_core import PydanticUndefinedType as UndefinedType
88+
else:
89+
from ._compat import ModelMetaclass, Representation, Undefined, UndefinedType
9290

9391
_T = TypeVar("_T")
9492
NoArgAnyCallable = Callable[[], Any]

0 commit comments

Comments
 (0)