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

Function _extract

tests/test_csharp_enum_members.py:19–31  ·  view source on GitHub ↗
(tmp_path, files: dict[str, str])

Source from the content-addressed store, hash-verified

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

Calls 2

extractFunction · 0.90
itemsMethod · 0.45

Tested by

no test coverage detected