From 64f3cea0694e89f3c0d0b618f6aed66aa028cd04 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2024 11:41:42 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20format?= =?UTF-8?q?=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/dependencies/utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 26222f27b..d2cb48ad4 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -222,7 +222,6 @@ def _get_flat_fields_from_params(fields: List[ModelField]) -> List[ModelField]: return fields_to_extract - def get_flat_params(dependant: Dependant) -> List[ModelField]: flat_dependant = get_flat_dependant(dependant, skip_repeats=True) path_params = _get_flat_fields_from_params(flat_dependant.path_params) @@ -754,10 +753,14 @@ def request_params_to_args( fields_to_extract = fields params_to_process: Dict[str, Any] = {} - model_fields = [field for field in fields if lenient_issubclass(field.type_, BaseModel)] + model_fields = [ + field for field in fields if lenient_issubclass(field.type_, BaseModel) + ] if model_fields: fields_to_extract = [ - cached_field for field in fields for cached_field in get_cached_model_fields(field.type_) + cached_field + for field in fields + for cached_field in get_cached_model_fields(field.type_) ] processed_keys = set()