Avoid using string literals in type annotations (#2294)

This commit is contained in:
Yusuke Miyazaki
2018-07-03 12:23:29 +09:00
committed by Jelle Zijlstra
parent 25ad95de4f
commit 6192cce9d9
50 changed files with 175 additions and 175 deletions

View File

@@ -85,7 +85,7 @@ class BytesIO(BinaryIO):
# copied from IOBase
def __iter__(self) -> Iterator[bytes]: ...
def __next__(self) -> bytes: ...
def __enter__(self) -> 'BytesIO': ...
def __enter__(self) -> BytesIO: ...
def __exit__(self, t: Optional[Type[BaseException]] = ..., value: Optional[BaseException] = ...,
traceback: Optional[TracebackType] = ...) -> bool: ...
def close(self) -> None: ...
@@ -186,7 +186,7 @@ class TextIOWrapper(TextIO):
newlines = ... # type: Union[str, Tuple[str, ...], None]
def __iter__(self) -> Iterator[str]: ...
def __next__(self) -> str: ...
def __enter__(self) -> 'TextIO': ...
def __enter__(self) -> TextIO: ...
def detach(self) -> IOBase: ...
def write(self, s: str) -> int: ...
def readline(self, size: int = ...) -> str: ...
@@ -202,7 +202,7 @@ class StringIO(TextIOWrapper):
# as a read-only property on IO[].
name: Any
def getvalue(self) -> str: ...
def __enter__(self) -> 'StringIO': ...
def __enter__(self) -> StringIO: ...
class IncrementalNewlineDecoder(codecs.IncrementalDecoder):
def decode(self, input: bytes, final: bool = ...) -> str: ...