From bad2c6be48019af802472272344febd65e9c3c0d Mon Sep 17 00:00:00 2001 From: Purushothaman Kumaravel Date: Sun, 3 May 2026 17:12:04 +0530 Subject: [PATCH] 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 <223556219+Copilot@users.noreply.github.com> --- docs_src/custom_api_router/tutorial001.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs_src/custom_api_router/tutorial001.py b/docs_src/custom_api_router/tutorial001.py index cf37fe4236..00e65a3572 100644 --- a/docs_src/custom_api_router/tutorial001.py +++ b/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, ):