MCPcopy Index your code
hub / github.com/MagicStack/contextvars / _get_context

Function _get_context

contextvars/__init__.py:188–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187
188def _get_context():
189 ctx = getattr(_state, 'context', None)
190 if ctx is None:
191 ctx = Context()
192 _state.context = ctx
193 return ctx
194
195
196def _set_context(ctx):

Callers 5

runMethod · 0.85
getMethod · 0.85
setMethod · 0.85
resetMethod · 0.85
copy_contextFunction · 0.85

Calls 1

ContextClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…