From 404aadf1d7180fac0d9c95100e17ad39a8a27267 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 9 Feb 2026 08:23:37 +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_router_events.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_router_events.py b/tests/test_router_events.py index a6a64fd47f..a47d119139 100644 --- a/tests/test_router_events.py +++ b/tests/test_router_events.py @@ -322,7 +322,6 @@ def test_router_async_generator_lifespan(state: State) -> None: def test_startup_shutdown_handlers_as_parameters(state: State) -> None: """Test that startup/shutdown handlers passed as parameters to FastAPI are called correctly.""" - def app_startup() -> None: state.app_startup = True @@ -343,16 +342,15 @@ def test_startup_shutdown_handlers_as_parameters(state: State) -> None: router = APIRouter(on_startup=[router_startup], on_shutdown=[router_shutdown]) - def sub_router_startup() -> None: state.sub_router_startup = True def sub_router_shutdown() -> None: state.sub_router_shutdown = True - - sub_router = APIRouter(on_startup=[sub_router_startup], on_shutdown=[sub_router_shutdown]) - + sub_router = APIRouter( + on_startup=[sub_router_startup], on_shutdown=[sub_router_shutdown] + ) router.include_router(sub_router) app.include_router(router)