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

Function _run

tests/test_read_hook.py:31–39  ·  view source on GitHub ↗
(tool_input, cwd, *, graph: bool)

Source from the content-addressed store, hash-verified

29
30
31def _run(tool_input, cwd, *, graph: bool):
32 if graph:
33 (cwd / "graphify-out").mkdir(parents=True, exist_ok=True)
34 (cwd / "graphify-out" / "graph.json").write_text("{}", encoding="utf-8")
35 stdin = json.dumps({"tool_input": tool_input})
36 return subprocess.run(
37 [sys.executable, "-m", "graphify", "hook-guard", "read"],
38 input=stdin, capture_output=True, text=True, cwd=cwd, env=_env(),
39 )
40
41
42def test_matcher_targets_read_and_glob():

Calls 2

_envFunction · 0.70
runMethod · 0.65

Tested by

no test coverage detected