do not expand the last layer of lists

This commit is contained in:
iclementine 2020-11-20 16:17:24 +08:00
parent ce29ac68b3
commit 2ed26d3416
1 changed files with 2 additions and 2 deletions

View File

@ -7,10 +7,10 @@ import yaml
class Config(attrdict.AttrDict):
def dump(self, path):
with open(path, 'wt') as f:
yaml.safe_dump(dict(self), f)
yaml.safe_dump(dict(self), f, default_flow_style=None)
def dumps(self):
return yaml.safe_dump(dict(self))
return yaml.safe_dump(dict(self), default_flow_style=None)
@classmethod
def from_file(cls, path):