From 6262fe210cd5e79fbbfb840ede62b66b8c0f6edb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 22:33:45 +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 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index bd8717e11..8d3c4a17d 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -347,9 +347,7 @@ def get_request_handler( response: Response | None = None file_stack = request.scope.get("fastapi_middleware_astack") if not isinstance(file_stack, AsyncExitStack): - raise FastAPIError( - "fastapi_middleware_astack not found in request scope" - ) + raise FastAPIError("fastapi_middleware_astack not found in request scope") # Extract endpoint context for error messages endpoint_ctx = ( @@ -417,9 +415,7 @@ def get_request_handler( errors: list[Any] = [] async_exit_stack = request.scope.get("fastapi_inner_astack") if not isinstance(async_exit_stack, AsyncExitStack): - raise FastAPIError( - "fastapi_inner_astack not found in request scope" - ) + raise FastAPIError("fastapi_inner_astack not found in request scope") solved_result = await solve_dependencies( request=request, dependant=dependant, @@ -514,9 +510,7 @@ def get_websocket_app( endpoint_ctx["path"] = f"WS {mount_path}{dependant.path}" async_exit_stack = websocket.scope.get("fastapi_inner_astack") if not isinstance(async_exit_stack, AsyncExitStack): - raise FastAPIError( - "fastapi_inner_astack not found in request scope" - ) + raise FastAPIError("fastapi_inner_astack not found in request scope") solved_result = await solve_dependencies( request=websocket, dependant=dependant,