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

Function get_path

mypy/server/objgraph.py:92–101  ·  view source on GitHub ↗
(
    o: object, seen: dict[int, object], parents: dict[int, tuple[int, object]]
)

Source from the content-addressed store, hash-verified

90
91
92def get_path(
93 o: object, seen: dict[int, object], parents: dict[int, tuple[int, object]]
94) -> list[tuple[object, object]]:
95 path = []
96 while id(o) in parents:
97 pid, attr = parents[id(o)]
98 o = seen[pid]
99 path.append((attr, o))
100 path.reverse()
101 return path

Callers 1

check_consistencyFunction · 0.90

Calls 3

idFunction · 0.85
appendMethod · 0.80
reverseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…