Browse Source

fix: replace deprecated typing.List/Set with builtins in tutorial

Fixes ruff UP035 lint errors in docs_src/custom_api_router/tutorial001.py.

Co-authored-by: Copilot <[email protected]>
pull/13483/head
Purushothaman Kumaravel 1 month ago
parent
commit
bad2c6be48
  1. 4
      docs_src/custom_api_router/tutorial001.py

4
docs_src/custom_api_router/tutorial001.py

@ -1,6 +1,6 @@
import time
from collections.abc import Awaitable, Callable
from typing import Any, List, Set, Union
from typing import Any
from fastapi import APIRouter, FastAPI, Request, Response
from fastapi.responses import JSONResponse
@ -67,7 +67,7 @@ class AppRouter(APIRouter):
self,
path: str,
endpoint: Callable[..., Any],
methods: Union[Set[str], List[str]], # noqa
methods: set[str] | list[str],
name: str,
**kwargs,
):

Loading…
Cancel
Save