MCPcopy Index your code
hub / github.com/plotly/dash / assert_context

Function assert_context

dash/_callback_context.py:22–27  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

20def has_context(func):
21 @functools.wraps(func)
22 def assert_context(*args, **kwargs):
23 if not context_value.get():
24 raise exceptions.MissingCallbackContextException(
25 f"dash.callback_context.{getattr(func, '__name__')} is only available from a callback!"
26 )
27 return func(*args, **kwargs)
28
29 return assert_context
30

Callers

nothing calls this directly

Calls 2

funcFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…