summaryrefslogtreecommitdiff
path: root/reader.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2021-05-31 08:36:28 +0200
committerAnthon van der Neut <anthon@mnt.org>2021-05-31 08:36:28 +0200
commitea3d878ef8635120354cd59a1f31b97b05a3e09b (patch)
tree75883248966af6cd241cbcd75bc40ba1bc856b6d /reader.py
parent35b81abf32f2567feba5957bc7c9d31782af3b1c (diff)
downloadruamel.yaml-ea3d878ef8635120354cd59a1f31b97b05a3e09b.tar.gz
fix 385 (missing attribute) and mypy issues0.17.6
Diffstat (limited to 'reader.py')
-rw-r--r--reader.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/reader.py b/reader.py
index ff62135..a78a878 100644
--- a/reader.py
+++ b/reader.py
@@ -42,7 +42,7 @@ class ReaderError(YAMLError):
self.reason = reason
def __str__(self):
- # type: () -> str
+ # type: () -> Any
if isinstance(self.character, bytes):
return _F(
"'{self_encoding!s}' codec can't decode byte #x{ord_self_character:02x}: "
@@ -212,7 +212,7 @@ class Reader:
@classmethod
def _get_non_printable_ascii(cls, data): # type: ignore
# type: (Text, bytes) -> Optional[Tuple[int, Text]]
- ascii_bytes = data.encode('ascii')
+ ascii_bytes = data.encode('ascii') # type: ignore
non_printables = ascii_bytes.translate(None, cls._printable_ascii) # type: ignore
if not non_printables:
return None