You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's weird is that the very same representer is added in lib/ruyaml/representer.py to bouth round trip and safe dumper, so AFAIK it should work as expected without manually forcing it. Am I missing anything?
Hi I'm trying to edit a yaml config file without messing with the original formatting. I'm loading it with
config, yaml_indent, yaml_block_seq_indent = ruamel.yaml.util.load_yaml_guess_indent(fp, preserve_quotes=True)
and dumping it with:
ruamel.yaml.round_trip_dump(config, fp, indent=yaml_indent, block_seq_indent=yaml_block_seq_indent)
everything looks fine except I a few lists with null elements which look like
list: ["a", "b", null, null, null]
in the original file but become in the edited one:
list: ["a", "b", !!null '', !!null'', !!null'']
Is this expected? any way to avoid it? I'd like to keep the file easy to read and modify by a human.
The text was updated successfully, but these errors were encountered: