Skip to content

Commit 5d4a15b

Browse files
author
Andrei Neagu
committed
fixed mypy
1 parent f0c82a1 commit 5d4a15b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/models-library/src/models_library/utils/_original_fastapi_encoders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def jsonable_encoder(
168168
sqlalchemy_safe=sqlalchemy_safe,
169169
)
170170
if dataclasses.is_dataclass(obj):
171-
obj_dict = dataclasses.asdict(obj) # type: ignore[call-overload]
171+
obj_dict = dataclasses.asdict(obj) # type: ignore[arg-type]
172172
return jsonable_encoder(
173173
obj_dict,
174174
include=include,

packages/models-library/src/models_library/utils/json_serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def pydantic_encoder(obj: Any) -> Any:
9797
return obj.model_dump()
9898

9999
if is_dataclass(obj):
100-
return asdict(obj) # type: ignore[call-overload]
100+
return asdict(obj) # type: ignore[arg-type]
101101

102102
# Check the class type and its superclasses for a matching encoder
103103
for base in obj.__class__.__mro__[:-1]:

0 commit comments

Comments
 (0)