From 860c85157027601c4165c5a7916a3fa59f878b2f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Jun 2023 18:33:05 +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/routing.py | 6 +++--- tests/test_router_events.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index 29b29977b..24c5277d3 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -6,19 +6,19 @@ import json from contextlib import AsyncExitStack, asynccontextmanager from enum import Enum, IntEnum from typing import ( - AsyncIterator, Any, + AsyncIterator, Callable, Coroutine, Dict, List, + Mapping, Optional, Sequence, Set, Tuple, Type, Union, - Mapping, ) from fastapi import params @@ -59,7 +59,7 @@ from starlette.routing import ( websocket_session, ) from starlette.status import WS_1008_POLICY_VIOLATION -from starlette.types import ASGIApp, Lifespan, Scope, AppType +from starlette.types import AppType, ASGIApp, Lifespan, Scope from starlette.websockets import WebSocket diff --git a/tests/test_router_events.py b/tests/test_router_events.py index 440b4b469..2b679ba64 100644 --- a/tests/test_router_events.py +++ b/tests/test_router_events.py @@ -120,7 +120,7 @@ def test_router_nested_lifespan_state(state: State) -> None: state.router_startup = True yield state.router_shutdown = True - + @asynccontextmanager async def subrouter_lifespan(app: FastAPI) -> AsyncGenerator[None, None]: state.sub_router_startup = True