def yaml_commit(diskdata, ctx): yaml_safe_dump(diskdata, open(ctx.opts.flags.file, 'w+'), default_flow_style=False)
def yaml_writer(data, file, opts): kwds = {} if opts.flags.pretty: kwds.update(dict(default_flow_style=False)) yaml_safe_dump(data, file, **kwds)