diff options
Diffstat (limited to 'settings.py')
| -rw-r--r-- | settings.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/settings.py b/settings.py index 43cb024..f11e930 100644 --- a/settings.py +++ b/settings.py @@ -28,12 +28,14 @@ class Config: def __post_init__(self): self.album_lists = [ AlbumList(*a) for a in self.album_lists ] + def __dict__(self): + return asdict(self) + @classmethod def load(cls, filepath): with open(filepath, "r") as fp: return cls(**json.load(fp)) def save(self, filepath): - data = asdict(self) with open(filepath, "w") as fp: - json.dump(data, fp, indent=2) + json.dump(asdict(self), fp, indent=2) |
