MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / dfs

Function dfs

codewiki/src/be/dependency_analyzer/topo_sort.py:214–224  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

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

Callers 1

dependency_first_dfsFunction · 0.85

Calls 2

addMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected