Skip to content

Commit b3fcaf0

Browse files
committed
🎨 Fix type annotations in _compat
1 parent b995766 commit b3fcaf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlmodel/_compat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def is_field_noneable(field: "FieldInfo") -> bool:
165165
return False
166166
return False
167167

168-
def get_type_from_field(field: Any) -> type:
168+
def get_type_from_field(field: Any) -> Any:
169169
type_: Any = field.annotation
170170
# Resolve Optional fields
171171
if type_ is None:
@@ -429,7 +429,7 @@ def is_field_noneable(field: "FieldInfo") -> bool:
429429
)
430430
return field.allow_none # type: ignore[no-any-return, attr-defined]
431431

432-
def get_type_from_field(field: Any) -> type:
432+
def get_type_from_field(field: Any) -> Any:
433433
if isinstance(field.type_, type) and field.shape == SHAPE_SINGLETON:
434434
return field.type_
435435
raise ValueError(f"The field {field.name} has no matching SQLAlchemy type")

0 commit comments

Comments
 (0)