MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _edges

Function _edges

tests/test_python_property_reads.py:34–45  ·  view source on GitHub ↗
(tmp_path: Path, files: dict[str, str])

Source from the content-addressed store, hash-verified

32
33
34def _edges(tmp_path: Path, files: dict[str, str]):
35 paths = []
36 for name, body in files.items():
37 p = tmp_path / name
38 p.parent.mkdir(parents=True, exist_ok=True)
39 p.write_text(body, encoding="utf-8")
40 paths.append(p)
41 r = extract(paths, root=tmp_path, cache_root=tmp_path / "graphify-out", parallel=False)
42 nodes = {n["id"]: n for n in r["nodes"]}
43 owner = {e["target"]: nodes[e["source"]]["label"] for e in r["edges"] if e["relation"] == "method"}
44 return {(nodes[e["source"]]["label"], owner.get(e["target"], ""), nodes[e["target"]]["label"], e.get("context"))
45 for e in r["edges"] if e["relation"] in ("calls", "references")}
46
47
48def test_self_property_read_in_its_own_class(tmp_path: Path):

Calls 3

extractFunction · 0.90
itemsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected