summaryrefslogtreecommitdiff
path: root/events.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 /events.py
parent209ce7fbd33c12263980c6c1468d36d0ffbf8ea7 (diff)
downloadruamel.yaml-a43ddb081d741ae5c536149c92ddbfbbd489fb4d.tar.gz
default to non-braced single item mappings in flow sequences0.15.64
Diffstat (limited to 'events.py')
-rw-r--r--events.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/events.py b/events.py
index 672042d..58b2121 100644
--- a/events.py
+++ b/events.py
@@ -46,7 +46,7 @@ class NodeEvent(Event):
class CollectionStartEvent(NodeEvent):
- __slots__ = 'tag', 'implicit', 'flow_style'
+ __slots__ = 'tag', 'implicit', 'flow_style', 'nr_items'
def __init__(
self,
@@ -57,12 +57,14 @@ class CollectionStartEvent(NodeEvent):
end_mark=None,
flow_style=None,
comment=None,
+ nr_items=None,
):
- # type: (Any, Any, Any, Any, Any, Any, Any) -> None
+ # type: (Any, Any, Any, Any, Any, Any, Any, Optional[int]) -> None
NodeEvent.__init__(self, anchor, start_mark, end_mark, comment)
self.tag = tag
self.implicit = implicit
self.flow_style = flow_style
+ self.nr_items = nr_items
class CollectionEndEvent(Event):