From f84ced1f997c7769db7efb855caead9766dfa644 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 12:39:18 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/dependencies/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 57ff7c9719..a9193ebd8b 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -931,7 +931,11 @@ def request_params_to_args( for err in exc.errors(include_url=False): err_loc = list(err["loc"]) - if err_loc and isinstance(err_loc[0], str) and err_loc[0] in name_to_alias: + if ( + err_loc + and isinstance(err_loc[0], str) + and err_loc[0] in name_to_alias + ): err_loc[0] = name_to_alias[err_loc[0]] err["loc"] = (field_in, *err_loc)