summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-10-16 17:40:21 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-10-16 17:40:21 +0200
commitdce0c0e60b88e12d0d3a20a64cfd0e0b47569b6a (patch)
tree085692b5650627683d0774b9872def9cba789b01
parentb8580cfafa36ca97ce249e7530916deb76b137c8 (diff)
downloadruamel.yaml-dce0c0e60b88e12d0d3a20a64cfd0e0b47569b6a.tar.gz
update for mypy, documentation
-rw-r--r--_doc/example.ryd5
-rw-r--r--emitter.py2
-rw-r--r--main.py1
3 files changed, 4 insertions, 4 deletions
diff --git a/_doc/example.ryd b/_doc/example.ryd
index c8e1c5d..dfb7240 100644
--- a/_doc/example.ryd
+++ b/_doc/example.ryd
@@ -125,7 +125,7 @@ both mappings and sequences. For sequences the indent is counted to the
beginning of the scalar, with the dash taking the first position of the
indented "space".
-You can change this default indentation by e.g. using ``yaml.indent()``:
+You can change this default indentation by e.g. using ``yaml.indent()``::
--- !python |
@@ -157,8 +157,7 @@ that the dash of the "parent" sequence is on the same line as the
first element resp. first key/value pair of the child collection.
If you want either or both of these (sequence within sequence, mapping
-within sequence) to begin on the next line use ``yaml.compact()``.
-
+within sequence) to begin on the next line use ``yaml.compact()``::
--- !python |
diff --git a/emitter.py b/emitter.py
index 05311f0..942eced 100644
--- a/emitter.py
+++ b/emitter.py
@@ -1588,7 +1588,7 @@ class Emitter(object):
end += 1
def write_comment(self, comment, pre=False):
- # type: (Any) -> None
+ # type: (Any, bool) -> None
value = comment.value
# nprintf('{:02d} {:02d} {!r}'.format(self.column, comment.start_mark.column, value))
if not pre and value[-1] == '\n':
diff --git a/main.py b/main.py
index 93c688e..35613ef 100644
--- a/main.py
+++ b/main.py
@@ -716,6 +716,7 @@ class YAML(object):
self.sequence_dash_offset = val
def compact(self, seq_seq=None, seq_map=None):
+ # type: (Any, Any) -> None
self.compact_seq_seq = seq_seq
self.compact_seq_map = seq_map