MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / display_path

Function display_path

scripts/docs/reference_common.py:66–72  ·  view source on GitHub ↗
(path: Path, *, cwd: Path | None = None, resolve: bool = False)

Source from the content-addressed store, hash-verified

64
65
66def display_path(path: Path, *, cwd: Path | None = None, resolve: bool = False) -> str:
67 base = cwd or Path.cwd()
68 display = path.resolve() if resolve else path
69 try:
70 return display.relative_to(base).as_posix()
71 except ValueError:
72 return path.as_posix()
73
74
75def reset_output_dir(output_dir: Path) -> None:

Callers 2

_write_moduleFunction · 0.90
_write_moduleFunction · 0.90

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected