Add YAML serialization of options
This uses ruamel.yaml. The library seems well-supported, and can do in-place modification of config files that retains user comments and file structure.
This commit is contained in:
parent
150372e297
commit
6aacd27ab2
|
@ -124,10 +124,6 @@ class OptManager(metaclass=_DefaultsMeta):
|
||||||
def keys(self):
|
def keys(self):
|
||||||
return set(self._opts.keys())
|
return set(self._opts.keys())
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def default(klass, opt):
|
|
||||||
return copy.deepcopy(klass._defaults[opt])
|
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
"""
|
"""
|
||||||
Restore defaults for all options.
|
Restore defaults for all options.
|
||||||
|
|
Loading…
Reference in New Issue