diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-08-21 17:32:45 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-08-21 17:32:45 +0200 |
commit | a0f924806ef8d20caf7a91171b7e631a7d74d47a (patch) | |
tree | 16401918e1747fb24b793d19ef177178f1673995 /main.py | |
parent | 7cf9da0b91d4669736eb82c8e2be06c34f5af50a (diff) | |
download | ruamel.yaml-a0f924806ef8d20caf7a91171b7e631a7d74d47a.tar.gz |
allow setting of yaml.default_flow_style = None in new API
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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: |