Skip to content

Commit 9e6bf3d

Browse files
authored
Merge pull request #2046 from apache/abderrahim/roundtrip
_yaml: set a large 'width' value in the roundtrip yaml config
2 parents dbb38af + 6258d89 commit 9e6bf3d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/buildstream/_yaml.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ yaml.RoundTripConstructor.add_constructor(u'tag:yaml.org,2002:timestamp',
389389
def prepare_roundtrip_yaml():
390390
yml = yaml.YAML()
391391
yml.preserve_quotes=True
392+
# defaults to 80 if we don't set it
393+
yml.width=9999
392394

393395
# For each of YAML 1.1 and 1.2, force everything to be a plain string
394396

tests/internals/yaml/roundtrip-test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,7 @@ nullcheck: null
5151

5252
timestamp: 2019-03-14
5353

54+
long-string: Sometimes very long strings get truncated by ruamel-yaml because the default width is set to 80.
55+
5456
# That is all
5557

0 commit comments

Comments
 (0)