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:
Aldo Cortesi 2016-12-05 07:18:53 +13:00
parent 150372e297
commit 6aacd27ab2
1 changed files with 0 additions and 4 deletions

View File

@ -124,10 +124,6 @@ class OptManager(metaclass=_DefaultsMeta):
def keys(self):
return set(self._opts.keys())
@classmethod
def default(klass, opt):
return copy.deepcopy(klass._defaults[opt])
def reset(self):
"""
Restore defaults for all options.