MCPcopy
hub / github.com/plotly/dash / _make_context

Function _make_context

tests/unit/library/test_background_callback_serialisation.py:42–60  ·  view source on GitHub ↗

Build a minimal callback context containing ``args``. Parameters ---------- args_value : Any The value to store under the ``args`` key. Returns ------- AttributeDict A context with the keys ``_setup_background_callback`` expects to find and pop.

(args_value)

Source from the content-addressed store, hash-verified

40
41
42def _make_context(args_value):
43 """Build a minimal callback context containing ``args``.
44
45 Parameters
46 ----------
47 args_value : Any
48 The value to store under the ``args`` key.
49
50 Returns
51 -------
52 AttributeDict
53 A context with the keys ``_setup_background_callback`` expects to find
54 and pop.
55 """
56 return AttributeDict(
57 args=args_value,
58 background_callback_manager=object(),
59 dash_response=object(),
60 )
61
62
63class _CapturingManager:

Callers 1

_run_setupFunction · 0.85

Calls 1

AttributeDictClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…