Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions ypkg2/cli/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
## to start with `- ?`. Override this limit in ruamel to allow us to continue to mangle the YAML spec in this way.
## 32x the limit oughta be enough for anyone, right?
from ruamel.yaml.emitter import Emitter

Emitter.MAX_SIMPLE_KEY_LENGTH = 4096


Expand All @@ -38,13 +39,11 @@ def main():
fp.seek(0)
yaml = YAML()
data = yaml.load(fp)
data['release'] += 1
data["release"] += 1
maxwidth = len(max(lines, key=len))
try:
with open(sys.argv[1], 'w') as fp:
yaml.indent(mapping=4, sequence=4, offset=4)
yaml.top_level_colon_align = True
yaml.prefix_colon = ' '
with open(sys.argv[1], "w") as fp:
yaml.indent(mapping=4, sequence=6, offset=4)
yaml.width = maxwidth
yaml.dump(data, fp)
except Exception as e:
Expand Down
2 changes: 0 additions & 2 deletions ypkg2/cli/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ def main():
try:
with open(ymlfile, "w") as fp:
yaml.indent(mapping=4, sequence=4, offset=4)
yaml.top_level_colon_align = True
yaml.prefix_colon = " "
yaml.width = maxwidth
yaml.dump(data, fp)
except Exception as e:
Expand Down