MCPcopy Index your code
hub / github.com/python/mypy / get_reachable_graph

Function get_reachable_graph

mypy/server/objgraph.py:76–89  ·  view source on GitHub ↗
(root: object)

Source from the content-addressed store, hash-verified

74
75
76def get_reachable_graph(root: object) -> tuple[dict[int, object], dict[int, tuple[int, object]]]:
77 parents = {}
78 seen = {id(root): root}
79 worklist = [root]
80 while worklist:
81 o = worklist.pop()
82 for s, e in get_edges(o):
83 if id(e) in seen:
84 continue
85 parents[id(e)] = (id(o), s)
86 seen[id(e)] = e
87 worklist.append(e)
88
89 return seen, parents
90
91
92def get_path(

Callers 1

check_consistencyFunction · 0.90

Calls 4

idFunction · 0.85
get_edgesFunction · 0.85
appendMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…