diff --git a/stdlib/2/typing.pyi b/stdlib/2/typing.pyi index 314743c82..e3ad6bd8c 100644 --- a/stdlib/2/typing.pyi +++ b/stdlib/2/typing.pyi @@ -275,7 +275,7 @@ class TextIO(IO[unicode]): @property def encoding(self) -> str: ... @property - def errors(self) -> str: ... + def errors(self) -> Optional[str]: ... @property def line_buffering(self) -> bool: ... @property diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index 5f232656e..4d05394f3 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -359,7 +359,7 @@ class TextIO(IO[str]): @property def encoding(self) -> str: ... @property - def errors(self) -> str: ... + def errors(self) -> Optional[str]: ... @property def line_buffering(self) -> int: ... # int on PyPy, bool on CPython @property