Skip to content

Commit a708162

Browse files
committed
Try to fix mypy error
1 parent 06deba8 commit a708162

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sqlmodel/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from pydantic.fields import FieldInfo as PydanticFieldInfo
3030
from pydantic.fields import ModelField, Undefined, UndefinedType
3131
from pydantic.main import ModelMetaclass, validate_model
32-
from pydantic.typing import ForwardRef, NoArgAnyCallable, resolve_annotations
32+
from pydantic.typing import NoArgAnyCallable, resolve_annotations
3333
from pydantic.utils import ROOT_KEY, Representation
3434
from sqlalchemy import Boolean, Column, Date, DateTime
3535
from sqlalchemy import Enum as sa_Enum
@@ -342,8 +342,6 @@ def __init__(
342342
config=BaseConfig,
343343
)
344344
relationship_to = temp_field.type_
345-
if isinstance(temp_field.type_, ForwardRef):
346-
relationship_to = temp_field.type_.__forward_arg__
347345
rel_kwargs: Dict[str, Any] = {}
348346
if rel_info.back_populates:
349347
rel_kwargs["back_populates"] = rel_info.back_populates

0 commit comments

Comments
 (0)