Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is probably not perfect but it indents more of the comment lines as prettier does.
Ideally, we need to peek at the next object to determine how to format the comment, but the Emitter does not have that information.
Hopefully a future release of
ruamel.yaml
will move more of the comment lines from "post" comments to "pre" comments so that the Emitter does not need to guess about what comes next.That involves changing the parsing layer to split up the comments somehow, but it is too big a change for us to implement by extending
ruamel.yaml
.This PR also fixes an issue where empty flow maps were written as
{ }
instead of{}
.