Walk a chain of keys through Components and dicts.
(node: Any, keys: list[str])
| 97 | |
| 98 | |
| 99 | def _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 | |
| 113 | def _collect_components(value: Any) -> list[Component]: |
no test coverage detected
searching dependent graphs…