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

Function rel

graphify/cli.py:649–655  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

647 manifest = None
648
649 def rel(value: str) -> str:
650 p = Path(value)
651 try:
652 value = (p if p.is_absolute() else root / p).resolve().relative_to(root).as_posix()
653 except (OSError, RuntimeError, ValueError):
654 pass
655 return nfc(value)
656
657 def source(record: object) -> str:
658 # Persisted state can be corrupt: skip what _stale_graph_sources skips.

Callers 1

Calls 2

nfcFunction · 0.90
resolveMethod · 0.45

Tested by

no test coverage detected