MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / _normalize_bearer

Function _normalize_bearer

python/openshell/sandbox.py:116–124  ·  view source on GitHub ↗
(
    bearer: str | Callable[[], str] | None,
)

Source from the content-addressed store, hash-verified

114
115
116def _normalize_bearer(
117 bearer: str | Callable[[], str] | None,
118) -> Callable[[], str] | None:
119 if bearer is None:
120 return None
121 if callable(bearer):
122 return cast("Callable[[], str]", bearer)
123 token = bearer
124 return lambda: token
125
126
127@dataclass(frozen=True)

Callers 2

__init__Method · 0.85

Calls

no outgoing calls