Post settings restructuring cleanup
This commit is contained in:
parent
231eb902e4
commit
3fca6648cb
|
@ -4,7 +4,6 @@ import io
|
||||||
import json
|
import json
|
||||||
import inspect
|
import inspect
|
||||||
import zipfile
|
import zipfile
|
||||||
from dataclasses import asdict
|
|
||||||
|
|
||||||
# Lib imports
|
# Lib imports
|
||||||
|
|
||||||
|
@ -184,4 +183,4 @@ class SettingsManager(StartCheckMixin, Singleton):
|
||||||
|
|
||||||
def save_settings(self):
|
def save_settings(self):
|
||||||
with open(self._CONFIG_FILE, 'w') as outfile:
|
with open(self._CONFIG_FILE, 'w') as outfile:
|
||||||
json.dump(asdict(self.settings), outfile, separators=(',', ':'), indent=4)
|
json.dump(self.settings.as_dict(), outfile, separators=(',', ':'), indent=4)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Python imports
|
# Python imports
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from dataclasses import asdict
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
|
|
||||||
|
@ -22,3 +23,6 @@ class Settings:
|
||||||
self.filters = Filters(**self.filters)
|
self.filters = Filters(**self.filters)
|
||||||
self.theming = Theming(**self.theming)
|
self.theming = Theming(**self.theming)
|
||||||
self.debugging = Debugging(**self.debugging)
|
self.debugging = Debugging(**self.debugging)
|
||||||
|
|
||||||
|
def as_dict(self):
|
||||||
|
return asdict(self)
|
||||||
|
|
Loading…
Reference in New Issue