diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-10-16 17:40:21 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-10-16 17:40:21 +0200 |
commit | dce0c0e60b88e12d0d3a20a64cfd0e0b47569b6a (patch) | |
tree | 085692b5650627683d0774b9872def9cba789b01 | |
parent | b8580cfafa36ca97ce249e7530916deb76b137c8 (diff) | |
download | ruamel.yaml-dce0c0e60b88e12d0d3a20a64cfd0e0b47569b6a.tar.gz |
update for mypy, documentation
-rw-r--r-- | _doc/example.ryd | 5 | ||||
-rw-r--r-- | emitter.py | 2 | ||||
-rw-r--r-- | main.py | 1 |
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 | @@ -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': @@ -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 |