Skip to content

Commit

Permalink
block_seq_indent set to 2 to fix formatting on popular editing tools
Browse files Browse the repository at this point in the history
  • Loading branch information
doino-gretchenliev committed Dec 7, 2019
1 parent 3ddd897 commit 23073f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compose_format/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def format(self, path, replace=False, strict=True):

def format_string(self, data, replace=False, strict=True):
data = self.reorder(load(data, RoundTripLoader), strict=strict)
formatted = dump(data, Dumper=RoundTripDumper, indent=2, width=120)
formatted = dump(data, Dumper=RoundTripDumper,
indent=2, block_seq_indent=2, width=120)

return formatted.strip() + '\n'

Expand Down

0 comments on commit 23073f9

Please sign in to comment.