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

Function _extract

tests/test_swift_protocol_dispatch.py:24–37  ·  view source on GitHub ↗
(tmp_path, files: dict[str, str])

Source from the content-addressed store, hash-verified

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

Calls 2

extractFunction · 0.90
itemsMethod · 0.45

Tested by

no test coverage detected