Skip to content

Commit 27dd6c4

Browse files
committed
fix type ignores
1 parent 9f34cc5 commit 27dd6c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlmodel/_compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def init_pydantic_private_attrs(new_object: InstanceOrType["SQLModel"]) -> None:
116116
object.__setattr__(new_object, "__pydantic_private__", None)
117117

118118
def get_annotations(class_dict: Dict[str, Any]) -> Dict[str, Any]:
119-
return class_dict.get("__annotations__", {}) # type: ignore[no-any-return]
119+
return class_dict.get("__annotations__", {})
120120

121121
def is_table_model_class(cls: Type[Any]) -> bool:
122122
config = getattr(cls, "model_config", {})
@@ -173,7 +173,7 @@ def is_field_noneable(field: "FieldInfo") -> bool:
173173
if not field.is_required():
174174
if field.default is Undefined:
175175
return False
176-
if field.annotation is None or field.annotation is NoneType:
176+
if field.annotation is None or field.annotation is NoneType: # type: ignore[comparison-overlap]
177177
return True
178178
return False
179179
return False

0 commit comments

Comments
 (0)