configuration: added 'as_dict()' as an instance function

This commit is contained in:
juk0de 2023-08-19 08:04:41 +02:00
parent 03304bdbc6
commit 176c1b634d

View File

@ -64,3 +64,6 @@ class Config():
def to_file(self, path: str) -> None: def to_file(self, path: str) -> None:
with open(path, 'w') as f: with open(path, 'w') as f:
yaml.dump(asdict(self), f) yaml.dump(asdict(self), f)
def as_dict(self) -> dict[str, Any]:
return asdict(self)