From 2601a12c886a2b5bb231a3ffe8bdf8f9f8c58f8f Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 9 Nov 2015 14:06:49 -0800 Subject: [PATCH] fix return types in _io.pyi --- builtins/2.7/_io.pyi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builtins/2.7/_io.pyi b/builtins/2.7/_io.pyi index a8119a877..e85da3317 100644 --- a/builtins/2.7/_io.pyi +++ b/builtins/2.7/_io.pyi @@ -87,13 +87,15 @@ class _TextIOBase(_IOBase): newlines = ... # type: Union[str, unicode] encoding = ... # type: Optional[str] def read(self, n: int = ...) -> str: ... - def write(self): ... - def detach(self): ... + def write(self) -> None: + raise UnsupportedOperation + def detach(self) -> None: + raise UnsupportedOperation class StringIO(_TextIOBase): line_buffering = ... # type: bool def getvalue(self) -> str: ... - def __setstate__(self, state: tuple): ... + def __setstate__(self, state: tuple) -> None: ... def __getstate__(self) -> tuple: ... class TextIOWrapper(_TextIOBase):