From f42166e999cdd6230de4b2241d0fc3951874667c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 10:22:20 +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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index b3821e814..12a250fce 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -775,9 +775,9 @@ def request_params_to_args( # If headers are in a Pydantic model, the way to disable convert_underscores # would be with Header(convert_underscores=False) at the Pydantic model level convert_underscores = getattr( - field.field_info, - "convert_underscores", - getattr(base_field.field_info, "convert_underscores", True) + field.field_info, + "convert_underscores", + getattr(base_field.field_info, "convert_underscores", True), ) if convert_underscores: alias = ( @@ -797,9 +797,9 @@ def request_params_to_args( for field in fields: field_info = field.field_info - assert isinstance( - field_info, params.Param - ), "Params must be subclasses of Param" + assert isinstance(field_info, params.Param), ( + "Params must be subclasses of Param" + ) if lenient_issubclass(field.type_, BaseModel): value = params_to_process