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

Function prefix_navigation_paths

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

Source from the content-addressed store, hash-verified

147
148
149def prefix_navigation_paths(value: object, pages_dir: str) -> object:
150 if isinstance(value, dict):
151 mapping = cast("YamlMapping", value)
152 for key in ("path", "folder"):
153 if key in mapping:
154 mapping[key] = prefix_path(mapping[key], pages_dir)
155 for child in mapping.values():
156 prefix_navigation_paths(child, pages_dir)
157 elif isinstance(value, list):
158 for child in cast("list[object]", value):
159 prefix_navigation_paths(child, pages_dir)
160 return value
161
162
163def version_navigation(source_index: Path, pages_dir: str) -> YamlMapping:

Callers 1

version_navigationFunction · 0.85

Calls 1

prefix_pathFunction · 0.85

Tested by

no test coverage detected