things kinda work
This commit is contained in:
parent
c38ce5cfe6
commit
7eb697fecd
10 changed files with 342 additions and 29 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue