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

This commit is contained in:
juk0de 2023-08-19 08:04:41 +02:00
parent fa5d88f7a1
commit 029e54ac14

View File

@ -63,4 +63,7 @@ class Config():
def to_file(self, path: str) -> None:
with open(path, 'w') as f:
yaml.dump(asdict(self), f)
yaml.dump(asdict(self), f, sort_keys=False)
def as_dict(self) -> dict[str, Any]:
return asdict(self)