summaryrefslogtreecommitdiff
path: root/constructor.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 /constructor.py
parent209ce7fbd33c12263980c6c1468d36d0ffbf8ea7 (diff)
downloadruamel.yaml-a43ddb081d741ae5c536149c92ddbfbbd489fb4d.tar.gz
default to non-braced single item mappings in flow sequences0.15.64
Diffstat (limited to 'constructor.py')
-rw-r--r--constructor.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/constructor.py b/constructor.py
index 26a4dd1..169155c 100644
--- a/constructor.py
+++ b/constructor.py
@@ -1562,15 +1562,15 @@ class RoundTripConstructor(SafeConstructor):
yield data2
return
elif isinstance(node, SequenceNode):
- data = CommentedSeq()
- data._yaml_set_line_col(node.start_mark.line, node.start_mark.column)
+ data3 = CommentedSeq()
+ data3._yaml_set_line_col(node.start_mark.line, node.start_mark.column)
if node.flow_style is True:
- data.fa.set_flow_style()
+ data3.fa.set_flow_style()
elif node.flow_style is False:
- data.fa.set_block_style()
- data.yaml_set_tag(node.tag)
- yield data
- data.extend(self.construct_sequence(node))
+ data3.fa.set_block_style()
+ data3.yaml_set_tag(node.tag)
+ yield data3
+ data3.extend(self.construct_sequence(node))
return
except: # NOQA
pass