configuration: added 'asdict()' as an instance function
This commit is contained in:
parent
b16bfc7454
commit
cd746fcd45
@ -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 asdict(self) -> dict[str, Any]:
|
||||||
|
return asdict(self)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user