mirror of https://github.com/tiangolo/fastapi.git
⬆️ Update mypy to 1.14.1 (#12970)
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> Co-authored-by: svlandeg <svlandeg@github.com> Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
This commit is contained in:
parent
ee46b851bc
commit
a95e91e46e
|
|
@ -241,6 +241,7 @@ def jsonable_encoder(
|
|||
sqlalchemy_safe=sqlalchemy_safe,
|
||||
)
|
||||
if dataclasses.is_dataclass(obj):
|
||||
assert not isinstance(obj, type)
|
||||
obj_dict = dataclasses.asdict(obj)
|
||||
return jsonable_encoder(
|
||||
obj_dict,
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ def _prepare_response_content(
|
|||
for k, v in res.items()
|
||||
}
|
||||
elif dataclasses.is_dataclass(res):
|
||||
assert not isinstance(res, type)
|
||||
return dataclasses.asdict(res)
|
||||
return res
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
-r requirements-docs-tests.txt
|
||||
pytest >=7.1.3,<9.0.0
|
||||
coverage[toml] >= 6.5.0,< 8.0
|
||||
mypy ==1.8.0
|
||||
mypy ==1.14.1
|
||||
dirty-equals ==0.9.0
|
||||
sqlmodel==0.0.24
|
||||
flask >=1.1.2,<4.0.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue