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

Function _walk

dash/_layout_utils.py:31–48  ·  view source on GitHub ↗
(
    node: Any,
    ancestors: tuple[Component, ...],
)

Source from the content-addressed store, hash-verified

29
30
31def _walk(
32 node: Any,
33 ancestors: tuple[Component, ...],
34) -> Generator[tuple[Component, tuple[Component, ...]], None, None]:
35 if node is None:
36 return
37 if isinstance(node, (list, tuple)):
38 for item in node:
39 yield from _walk(item, ancestors)
40 return
41 if not isinstance(node, Component):
42 return
43
44 yield node, ancestors
45
46 child_ancestors = (*ancestors, node)
47 for _prop_name, child in iter_children(node):
48 yield from _walk(child, child_ancestors)
49
50
51def iter_children(

Callers 1

traverseFunction · 0.85

Calls 1

iter_childrenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…