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

Function _resolve_path

dash/_layout_utils.py:99–110  ·  view source on GitHub ↗

Walk a chain of keys through Components and dicts.

(node: Any, keys: list[str])

Source from the content-addressed store, hash-verified

97
98
99def _resolve_path(node: Any, keys: list[str]) -> Any:
100 """Walk a chain of keys through Components and dicts."""
101 for key in keys:
102 if isinstance(node, Component):
103 node = getattr(node, key, None)
104 elif isinstance(node, dict):
105 node = node.get(key)
106 else:
107 return None
108 if node is None:
109 return None
110 return node
111
112
113def _collect_components(value: Any) -> list[Component]:

Callers 1

get_childrenFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…