MCPcopy Index your code
hub / github.com/evalplus/evalplus / get_deps

Function get_deps

evalplus/sanitize.py:47–60  ·  view source on GitHub ↗
(nodes: List[Tuple[str, Node]])

Source from the content-addressed store, hash-verified

45
46
47def get_deps(nodes: List[Tuple[str, Node]]) -> Dict[str, Set[str]]:
48 def dfs_get_deps(node: Node, deps: Set[str]) -> None:
49 for child in node.children:
50 if child.type == IDENTIFIER_TYPE:
51 deps.add(child.text.decode("utf8"))
52 else:
53 dfs_get_deps(child, deps)
54
55 name2deps = {}
56 for name, node in nodes:
57 deps = set()
58 dfs_get_deps(node, deps)
59 name2deps[name] = deps
60 return name2deps
61
62
63def get_function_dependency(entrypoint: str, call_graph: Dict[str, str]) -> Set[str]:

Callers 1

Calls 1

dfs_get_depsFunction · 0.85

Tested by

no test coverage detected