Write *data* as YAML to *path*, creating parent directories if needed.
(path: Path, data: dict[str, Any])
| 59 | |
| 60 | |
| 61 | def save_config(path: Path, data: dict[str, Any]) -> None: |
| 62 | """Write *data* as YAML to *path*, creating parent directories if needed.""" |
| 63 | path.parent.mkdir(parents=True, exist_ok=True) |
| 64 | path.write_text(yaml.dump(data, default_flow_style=False, sort_keys=False)) |