(
node: Any,
ancestors: tuple[Component, ...],
)
| 29 | |
| 30 | |
| 31 | def _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 | |
| 51 | def iter_children( |
no test coverage detected
searching dependent graphs…