def to_yaml(self):
"""
Pretty print dump as YAML.
"""
return dump(
self.to_safe_dict(),
# show every document in its own block
default_flow_style=False,
# start a new document (via "---") before every resource
explicit_start=True,
# follow (modern) PEP8 max line length and indent
width=99,
indent=4,
Dumper=SafeDumper,
)
评论列表
文章目录