summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-12-28 10:50:40 +0100
committerAnthon van der Neut <anthon@mnt.org>2018-12-28 10:50:40 +0100
commit96cf5fdbbfec1902fcaeeb3ba6c75ccf92f1f2f7 (patch)
tree1f8f741f303b47ef8f3cc1b340c9af7d635d046d /main.py
parent25b7008eb7721763fe0ea10cc23abeed2c1ef780 (diff)
downloadruamel.yaml-96cf5fdbbfec1902fcaeeb3ba6c75ccf92f1f2f7.tar.gz
work around issue 6112 in mypy
Diffstat (limited to 'main.py')
-rw-r--r--main.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.py b/main.py
index 851ae83..f06c52e 100644
--- a/main.py
+++ b/main.py
@@ -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