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

Function _extract

tests/test_go_interface_dispatch.py:42–56  ·  view source on GitHub ↗
(tmp_path: Path, files: dict[str, str])

Source from the content-addressed store, hash-verified

40
41
42def _extract(tmp_path: Path, files: dict[str, str]):
43 (tmp_path / "go.mod").write_text(_GO_MOD)
44 for name, body in files.items():
45 p = tmp_path / name
46 p.parent.mkdir(parents=True, exist_ok=True)
47 p.write_text(body)
48 r = extract(
49 sorted(tmp_path / n for n in files),
50 cache_root=tmp_path / "cache",
51 root=tmp_path,
52 parallel=False,
53 )
54 dispatch = {(e["source"], e["target"]) for e in r["edges"]
55 if e["relation"] == "dispatches_to"}
56 return dispatch, r
57
58
59def _find(r, label, id_contains):

Calls 2

extractFunction · 0.90
itemsMethod · 0.45

Tested by

no test coverage detected