Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def render_yaml(data):
if isinstance(data, list):
data = flatten_documents_lists(data)
return yaml.dump_all(data,
Dumper=pyaml.PrettyYAMLDumper,
allow_unicode=True,
default_flow_style=False,
)