Write ``data`` as YAML to ``repo_path``.
(repo_path, file_path, data)
| 166 | |
| 167 | |
| 168 | def write_file(repo_path, file_path, data): |
| 169 | """Write ``data`` as YAML to ``repo_path``.""" |
| 170 | write_to = repo_path / file_path |
| 171 | write_to.parent.mkdir(parents=True, exist_ok=True) |
| 172 | with open(write_to, encoding="utf-8", mode="w") as f: |
| 173 | f.write(saneyaml.dump(data)) |