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

Function normalize

tools/spec-loop/hooks/solo_spec_gate.py:88–95  ·  view source on GitHub ↗
(path: str, root: Path)

Source from the content-addressed store, hash-verified

86
87
88def normalize(path: str, root: Path) -> str:
89 p = Path(path).expanduser()
90 if not p.is_absolute():
91 p = root / p
92 try:
93 return p.resolve().relative_to(root.resolve()).as_posix()
94 except ValueError:
95 return p.as_posix()
96
97
98def extract_paths(payload: dict, root: Path) -> list[str]:

Callers 1

extract_pathsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected