Browse Source

🎨 Auto format

pull/14928/head
pre-commit-ci-lite[bot] 4 months ago
committed by GitHub
parent
commit
6240dc105a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      fastapi/routing.py

6
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:

Loading…
Cancel
Save