(node)
| 212 | |
| 213 | if not root_nodes: |
| 214 | logger.warning("No root nodes found in the graph, using arbitrary starting point") |
| 215 | root_nodes = list(acyclic_graph.keys())[:1] # Use the first node as starting point |
| 216 | |
| 217 | # Track visited nodes |
| 218 | visited = set() |
| 219 | result = [] |
| 220 | |
| 221 | # DFS function that processes dependencies first |
| 222 | def dfs(node): |
| 223 | if node in visited: |
| 224 | return |
| 225 | visited.add(node) |
| 226 | |
| 227 | # Visit all dependencies first |
no test coverage detected