From ce0990107dee02dfc6871961df2e7bda5dbb2fa3 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 22:07:56 +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 --- tests/test_ast_inference.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_ast_inference.py b/tests/test_ast_inference.py index f3482bb6c..70270f4d1 100644 --- a/tests/test_ast_inference.py +++ b/tests/test_ast_inference.py @@ -446,13 +446,14 @@ def test_infer_response_model_create_model_error(): func() from fastapi.utils import PYDANTIC_V2 - target = "pydantic.create_model" if PYDANTIC_V2 else "fastapi._compat.v1.create_model" - + target = ( + "pydantic.create_model" if PYDANTIC_V2 else "fastapi._compat.v1.create_model" + ) + with patch(target, side_effect=Exception("Boom")): assert infer_response_model_from_ast(func) is None - def test_contains_response() -> None: from fastapi.routing import _contains_response