From 0a97de688f22655f1b17b3a5dc089bf1c4dab842 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 19:48:04 +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/routing.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index c4d9504c1..1b553e0c2 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -545,12 +545,9 @@ class APIRoute(routing.Route): response_model = None else: response_model = return_annotation - if ( - response_model is None - or ( - not lenient_issubclass(response_model, BaseModel) - and not dataclasses.is_dataclass(response_model) - ) + if response_model is None or ( + not lenient_issubclass(response_model, BaseModel) + and not dataclasses.is_dataclass(response_model) ): inferred = infer_response_model_from_ast(endpoint) if inferred: