MCPcopy
hub / github.com/fastapi/fastapi / _restore_fastapi_scope_key

Function _restore_fastapi_scope_key

fastapi/routing.py:892–899  ·  view source on GitHub ↗
(scope: Scope, key: str, previous: Any)

Source from the content-addressed store, hash-verified

890
891
892def _restore_fastapi_scope_key(scope: Scope, key: str, previous: Any) -> None:
893 fastapi_scope = scope.get(_FASTAPI_SCOPE_KEY)
894 if not isinstance(fastapi_scope, dict):
895 return
896 if previous is _SCOPE_MISSING:
897 fastapi_scope.pop(key, None)
898 else:
899 fastapi_scope[key] = previous
900
901
902class _APIRouteLike(Protocol):

Callers 4

_matchMethod · 0.85
matchesMethod · 0.85
_match_low_priorityMethod · 0.85

Calls 1

getMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…