From ea3d878ef8635120354cd59a1f31b97b05a3e09b Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Mon, 31 May 2021 08:36:28 +0200 Subject: fix 385 (missing attribute) and mypy issues --- reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'reader.py') 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 -- cgit v1.2.1