use yaml instead of ruamel.yaml

This commit is contained in:
iclementine 2020-11-20 16:13:05 +08:00
parent d190ce8d7f
commit ce29ac68b3
1 changed files with 3 additions and 3 deletions

View File

@ -1,16 +1,16 @@
import attrdict
import flatdict
import argparse
from ruamel import yaml
import yaml
class Config(attrdict.AttrDict):
def dump(self, path):
with open(path, 'wt') as f:
yaml.safe_dump(dict(self), f, default_flow_style=False)
yaml.safe_dump(dict(self), f)
def dumps(self):
return yaml.safe_dump(dict(self), default_flow_style=False)
return yaml.safe_dump(dict(self))
@classmethod
def from_file(cls, path):