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

Function _extract

tests/test_csharp_partial_classes.py:21–33  ·  view source on GitHub ↗
(tmp_path, files: dict[str, str])

Source from the content-addressed store, hash-verified

19
20
21def _extract(tmp_path, files: dict[str, str]):
22 for name, body in files.items():
23 p = tmp_path / name
24 p.parent.mkdir(parents=True, exist_ok=True)
25 p.write_text(body)
26 old = os.getcwd()
27 try:
28 os.chdir(tmp_path)
29 r = extract([Path(n) for n in files], cache_root=tmp_path / ".cache")
30 finally:
31 os.chdir(old)
32 calls = {(e["source"], e["target"]) for e in r["edges"] if e["relation"] == "calls"}
33 return calls, r
34
35
36def _nodes_labeled(r, label):

Calls 2

extractFunction · 0.90
itemsMethod · 0.45

Tested by

no test coverage detected