Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-r requirements-docs-tests.txt
pytest >=7.0.1,<9.0.0
coverage[toml] >=6.2,<8.0
mypy ==1.4.1
mypy ==1.14.1
ruff ==0.13.0
# For FastAPI tests
fastapi >=0.103.2
Expand Down
4 changes: 2 additions & 2 deletions sqlmodel/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def init_pydantic_private_attrs(new_object: InstanceOrType["SQLModel"]) -> None:
object.__setattr__(new_object, "__pydantic_private__", None)

def get_annotations(class_dict: Dict[str, Any]) -> Dict[str, Any]:
return class_dict.get("__annotations__", {})
return class_dict.get("__annotations__", {}) # type: ignore[no-any-return]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As on L425, where we're already ignoring it, the error is

Returning Any from function declared to return "dict[str, Any]" [no-any-return]


def is_table_model_class(cls: Type[Any]) -> bool:
config = getattr(cls, "model_config", {})
Expand Down Expand Up @@ -180,7 +180,7 @@ def is_field_noneable(field: "FieldInfo") -> bool:
if not field.is_required():
if field.default is Undefined:
return False
if field.annotation is None or field.annotation is NoneType: # type: ignore[comparison-overlap]
if field.annotation is None or field.annotation is NoneType:
return True
return False
return False
Expand Down
Loading