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

Function read_yaml

tasks/scripts/sync_docs_website.py:126–131  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

124
125
126def read_yaml(path: Path) -> YamlMapping:
127 ensure_existing(path, "YAML file")
128 data = yaml.safe_load(path.read_text(encoding="utf-8"))
129 if not isinstance(data, dict):
130 raise ValueError(f"expected YAML mapping in {path}")
131 return cast("YamlMapping", data)
132
133
134def write_yaml(path: Path, data: YamlMapping) -> None:

Callers 3

version_navigationFunction · 0.70
update_docs_ymlFunction · 0.70
remove_docs_yml_entryFunction · 0.70

Calls 1

ensure_existingFunction · 0.85

Tested by

no test coverage detected