From ff94d8459f3e4318debb546e5cd9f272a510d2a2 Mon Sep 17 00:00:00 2001 From: Purushot14 Date: Thu, 13 Mar 2025 00:22:40 +0530 Subject: [PATCH] python 3.9 not supported | on type check so handle that --- docs_src/custom_api_router/tutorial001.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_src/custom_api_router/tutorial001.py b/docs_src/custom_api_router/tutorial001.py index d889c7a52..ea8cc9e05 100644 --- a/docs_src/custom_api_router/tutorial001.py +++ b/docs_src/custom_api_router/tutorial001.py @@ -91,7 +91,7 @@ class AppRouter(APIRouter): def add_route( self, path: str, - endpoint: Callable[[Request], Awaitable[Response] | Response], + endpoint: Callable[[Request], Union[Awaitable[Response], Response]], methods: list[str] | None = None, name: str | None = None, include_in_schema: bool = True,