things kinda work

This commit is contained in:
Pablo Martin 2024-08-13 15:02:03 +02:00
parent c38ce5cfe6
commit 7eb697fecd
10 changed files with 342 additions and 29 deletions

View file

@ -1,4 +1,5 @@
import pathlib
from typing import Any
import yaml
@ -6,3 +7,8 @@ import yaml
def read_yaml(path: pathlib.Path) -> dict:
with open(path) as f:
return yaml.safe_load(f)
def write_yaml(path: pathlib.Path, data: Any) -> None:
with open(path, "w") as outfile:
yaml.dump(data, outfile, default_flow_style=False)