From 70383585809457f43f6da03a512812902161f70f Mon Sep 17 00:00:00 2001 From: johnslavik Date: Sun, 21 Dec 2025 16:02:51 +0100 Subject: [PATCH] Lint fixes --- fastapi/routing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index 3faac322b..24fc77f81 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -153,7 +153,7 @@ def _prepare_response_content( exclude_none: bool = False, ) -> Any: if isinstance(res, BaseModel): - read_with_orm_mode = getattr(_get_model_config(res), "read_with_orm_mode", None) # type: ignore[arg-type] + read_with_orm_mode = getattr(_get_model_config(res), "read_with_orm_mode", None) if read_with_orm_mode: # Let from_orm extract the data from this model instead of converting # it now to a dict. @@ -161,7 +161,7 @@ def _prepare_response_content( # access instead of dict iteration, e.g. lazy relationships. return res return _model_dump( - res, # type: ignore[arg-type] + res, by_alias=True, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults,