diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-12-28 10:50:40 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-12-28 10:50:40 +0100 |
commit | 96cf5fdbbfec1902fcaeeb3ba6c75ccf92f1f2f7 (patch) | |
tree | 1f8f741f303b47ef8f3cc1b340c9af7d635d046d /main.py | |
parent | 25b7008eb7721763fe0ea10cc23abeed2c1ef780 (diff) | |
download | ruamel.yaml-96cf5fdbbfec1902fcaeeb3ba6c75ccf92f1f2f7.tar.gz |
work around issue 6112 in mypy
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -462,7 +462,7 @@ class YAML(object): """ if not hasattr(stream, 'write') and hasattr(stream, 'open'): # pathlib.Path() instance - with stream.open('w') as fp: # type: ignore + with stream.open('w') as fp: return self.dump_all(documents, fp, _kw, transform=transform) if _kw is not enforce: raise TypeError( @@ -501,7 +501,7 @@ class YAML(object): delattr(self, '_serializer') delattr(self, '_emitter') if transform: - val = stream.getvalue() # type: ignore + val = stream.getvalue() if self.encoding: val = val.decode(self.encoding) if fstream is None: @@ -723,7 +723,7 @@ class YAML(object): class YAMLContextManager(object): def __init__(self, yaml, transform=None): - # type: (Any, Optional[Callable]) -> None + # type: (Any, Any) -> None # used to be: (Any, Optional[Callable]) -> None self._yaml = yaml self._output_inited = False self._output_path = None |