MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / extract_paths

Function extract_paths

tools/spec-loop/hooks/solo_spec_gate.py:98–104  ·  view source on GitHub ↗
(payload: dict, root: Path)

Source from the content-addressed store, hash-verified

96
97
98def extract_paths(payload: dict, root: Path) -> list[str]:
99 tool_input = payload.get("tool_input", {}) or {}
100 paths: list[str] = []
101 for key in ("file_path", "path"):
102 if tool_input.get(key):
103 paths.append(normalize(str(tool_input[key]), root))
104 return sorted(set(paths))
105
106
107def is_test(path: str) -> bool:

Callers 1

mainFunction · 0.85

Calls 3

setFunction · 0.85
normalizeFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected