diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-03-17 11:18:10 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-03-17 11:18:10 +0100 |
commit | c8568f99215aaa910953287f63a25459e3800dfc (patch) | |
tree | 8e26ef5382230e96184737d09913d1a5728bd670 /reader.py | |
parent | f75754aa90ea4d53f87aba5fce692185a25514c3 (diff) | |
download | ruamel.yaml-c8568f99215aaa910953287f63a25459e3800dfc.tar.gz |
changes for mypy
Diffstat (limited to 'reader.py')
-rw-r--r-- | reader.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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" \ |