summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-08-21 17:32:45 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-08-21 17:32:45 +0200
commita0f924806ef8d20caf7a91171b7e631a7d74d47a (patch)
tree16401918e1747fb24b793d19ef177178f1673995 /main.py
parent7cf9da0b91d4669736eb82c8e2be06c34f5af50a (diff)
downloadruamel.yaml-a0f924806ef8d20caf7a91171b7e631a7d74d47a.tar.gz
allow setting of yaml.default_flow_style = None in new API
Diffstat (limited to 'main.py')
-rw-r--r--main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.py b/main.py
index 74d2507..426b313 100644
--- a/main.py
+++ b/main.py
@@ -70,7 +70,9 @@ class YAML(object):
self.Reader = None # type: Any
self.Scanner = None # type: Any
self.Serializer = None # type: Any
+ self.default_flow_style = None # type: Any
if self.typ == 'rt':
+ self.default_flow_style = False
# no optimized rt-dumper yet
self.Emitter = ruamel.yaml.emitter.Emitter # type: Any
self.Serializer = ruamel.yaml.serializer.Serializer # type: Any
@@ -128,7 +130,6 @@ class YAML(object):
self.explicit_end = None
self.tags = None
self.default_style = None
- self.default_flow_style = None
self.top_level_block_style_scalar_no_indent_error_1_1 = False
@property
@@ -206,6 +207,7 @@ class YAML(object):
None, canonical=self.canonical,
indent=self.old_indent, width=self.width,
allow_unicode=self.allow_unicode, line_break=self.line_break,
+ prefix_colon=self.prefix_colon,
dumper=self)
setattr(self, attr, _emitter)
if self.map_indent is not None: