Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
744954b
⬆ Bump mypy from 1.4.1 to 1.18.1
dependabot[bot] Sep 16, 2025
9110e0b
restrict to latest version that supports python 3.8
svlandeg Sep 16, 2025
35825de
Merge branch 'main' into dependabot/pip/mypy-1.18.1
svlandeg Sep 16, 2025
39f5bf5
remove unnecssary ignore statement
svlandeg Sep 16, 2025
479bbb6
add ignore statement
svlandeg Sep 16, 2025
a28075f
make ignore statement more specific
svlandeg Sep 16, 2025
a709b33
Merge branch 'main' into dependabot/pip/mypy-1.18.1
svlandeg Sep 16, 2025
74113b9
expand on mypy command to debug CI failure
svlandeg Sep 16, 2025
efe58df
Merge branch 'dependabot/pip/mypy-1.18.1' of https://github.com/fasta…
svlandeg Sep 16, 2025
94d0cb3
experiment with from future import
svlandeg Sep 16, 2025
94a7d1a
Merge branch 'main' into dependabot/pip/mypy-1.18.1
svlandeg Sep 26, 2025
8dca285
use the latest mypy for Python 3.9 and up
svlandeg Sep 26, 2025
5896004
fix type of keys to be removed
svlandeg Sep 26, 2025
b56fa37
annotate origin as Any to avoid type issues
svlandeg Sep 26, 2025
8cc9874
bump to 1.10.0 only for now
svlandeg Sep 29, 2025
763ef27
Merge branch 'main' into dependabot/pip/mypy-1.18.1
svlandeg Sep 29, 2025
9c4e0da
exclude one particular file from mypy processing
svlandeg Sep 29, 2025
4541f11
Try to bump to 1.18.2 again
svlandeg Sep 29, 2025
7446fb1
attempt to remove the future import again
svlandeg Sep 29, 2025
f30beb2
add back future import
svlandeg Sep 29, 2025
d787c3f
Merge branch 'main' into dependabot/pip/mypy-1.18.1
svlandeg Oct 8, 2025
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