MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / prefix_path

Function prefix_path

tasks/scripts/sync_docs_website.py:141–146  ·  view source on GitHub ↗
(value: object, pages_dir: str)

Source from the content-addressed store, hash-verified

139
140
141def prefix_path(value: object, pages_dir: str) -> object:
142 if not isinstance(value, str):
143 return value
144 if value.startswith(("../", "/", "http://", "https://")):
145 return value
146 return f"../{pages_dir}/{value}"
147
148
149def prefix_navigation_paths(value: object, pages_dir: str) -> object:

Callers 1

prefix_navigation_pathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected