From d25fb5065363ad525ded586c0e0fe2b4d167f263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 9 Oct 2025 20:36:04 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Tweak=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/dependencies/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 31908abfd..d13aafd10 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -1015,13 +1015,13 @@ def get_body_field( elif any( isinstance(f.field_info, _params_v1.File) for f in flat_dependant.body_params ): - BodyFieldInfo: Type[_params_v1.Body] = _params_v1.File + BodyFieldInfo: Type[_params_v1.Body] = _params_v1.File # type: ignore[no-redef] elif any(isinstance(f.field_info, params.Form) for f in flat_dependant.body_params): BodyFieldInfo = params.Form elif any( isinstance(f.field_info, _params_v1.Form) for f in flat_dependant.body_params ): - BodyFieldInfo = _params_v1.Form + BodyFieldInfo = _params_v1.Form # type: ignore[assignment] else: if annotation_is_pydantic_v1(BodyModel): BodyFieldInfo = _params_v1.Body # type: ignore[assignment]