summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-30 21:29:04 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-30 21:29:04 +0200
commita43ddb081d741ae5c536149c92ddbfbbd489fb4d (patch)
treec3320a62cbe473621d3cc132f6b5e7142fe6bfe0 /main.py
parent209ce7fbd33c12263980c6c1468d36d0ffbf8ea7 (diff)
downloadruamel.yaml-a43ddb081d741ae5c536149c92ddbfbbd489fb4d.tar.gz
default to non-braced single item mappings in flow sequences0.15.64
Diffstat (limited to 'main.py')
-rw-r--r--main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.py b/main.py
index 653ee1c..2c5c7d5 100644
--- a/main.py
+++ b/main.py
@@ -158,6 +158,8 @@ class YAML(object):
self.tags = None
self.default_style = None
self.top_level_block_style_scalar_no_indent_error_1_1 = False
+ # [a, b: 1, c: {d: 2}] vs. [a, {b: 1}, {c: {d: 2}}]
+ self.brace_single_entry_mapping_in_flow_sequence = False
@property
def reader(self):
@@ -239,6 +241,7 @@ class YAML(object):
allow_unicode=self.allow_unicode,
line_break=self.line_break,
prefix_colon=self.prefix_colon,
+ brace_single_entry_mapping_in_flow_sequence=self.brace_single_entry_mapping_in_flow_sequence, # NOQA
dumper=self,
)
setattr(self, attr, _emitter)