summaryrefslogtreecommitdiff
path: root/reader.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-03-17 11:18:10 +0100
committerAnthon van der Neut <anthon@mnt.org>2017-03-17 11:18:10 +0100
commitc8568f99215aaa910953287f63a25459e3800dfc (patch)
tree8e26ef5382230e96184737d09913d1a5728bd670 /reader.py
parentf75754aa90ea4d53f87aba5fce692185a25514c3 (diff)
downloadruamel.yaml-c8568f99215aaa910953287f63a25459e3800dfc.tar.gz
changes for mypy
Diffstat (limited to 'reader.py')
-rw-r--r--reader.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/reader.py b/reader.py
index 63307b7..a7f0c37 100644
--- a/reader.py
+++ b/reader.py
@@ -23,6 +23,8 @@ from __future__ import absolute_import
import codecs
import re
+from typing import Any, Dict, Optional, List # NOQA
+
from ruamel.yaml.error import YAMLError, FileMark, StringMark
from ruamel.yaml.compat import text_type, binary_type, PY3
@@ -32,6 +34,7 @@ __all__ = ['Reader', 'ReaderError']
class ReaderError(YAMLError):
def __init__(self, name, position, character, encoding, reason):
+ # type: (Any, Any, Any, Any, Any) -> None
self.name = name
self.character = character
self.position = position
@@ -39,6 +42,7 @@ class ReaderError(YAMLError):
self.reason = reason
def __str__(self):
+ # type () -> str
if isinstance(self.character, binary_type):
return "'%s' codec can't decode byte #x%02x: %s\n" \
" in \"%s\", position %d" \