From 6240dc105a8724f523ce210eaa67ee3a8561ac85 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:02:39 +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 --- fastapi/routing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index e6fec723b2..0ceb3394ea 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -237,9 +237,9 @@ class _DefaultLifespan: # Uses WeakKeyDictionary so entries are automatically evicted when the endpoint # function is garbage collected (e.g., when a dynamically created FastAPI app is # destroyed), preventing both memory leaks and stale-ID lookups. -_endpoint_context_cache: weakref.WeakKeyDictionary[Callable[..., Any], EndpointContext] = ( - weakref.WeakKeyDictionary() -) +_endpoint_context_cache: weakref.WeakKeyDictionary[ + Callable[..., Any], EndpointContext +] = weakref.WeakKeyDictionary() def _extract_endpoint_context(func: Any) -> EndpointContext: