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

Function _extract

tests/test_csharp_interface_dispatch.py:23–36  ·  view source on GitHub ↗
(tmp_path, files: dict[str, str])

Source from the content-addressed store, hash-verified

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

Calls 2

extractFunction · 0.90
itemsMethod · 0.45

Tested by

no test coverage detected