--- /dev/null
+# Stubs for StringIO (Python 2)\r
+\r
+from typing import Any, IO, AnyStr, Iterator, Iterable, Generic, List, Optional\r
+\r
+class StringIO(IO[AnyStr], Generic[AnyStr]):\r
+ closed = ... # type: bool\r
+ softspace = ... # type: int\r
+ len = ... # type: int\r
+ name = ... # type: str\r
+ def __init__(self, buf: AnyStr = ...) -> None: ...\r
+ def __iter__(self) -> Iterator[AnyStr]: ...\r
+ def next(self) -> AnyStr: ...\r
+ def close(self) -> None: ...\r
+ def isatty(self) -> bool: ...\r
+ def seek(self, pos: int, mode: int = ...) -> int: ...\r
+ def tell(self) -> int: ...\r
+ def read(self, n: int = ...) -> AnyStr: ...\r
+ def readline(self, length: int = ...) -> AnyStr: ...\r
+ def readlines(self, sizehint: int = ...) -> List[AnyStr]: ...\r
+ def truncate(self, size: Optional[int] = ...) -> int: ...\r
+ def write(self, s: AnyStr) -> int: ...\r
+ def writelines(self, iterable: Iterable[AnyStr]) -> None: ...\r
+ def flush(self) -> None: ...\r
+ def getvalue(self) -> AnyStr: ...\r
+ def __enter__(self) -> Any: ...\r
+ def __exit__(self, type: Any, value: Any, traceback: Any) -> Any: ...\r
+ def fileno(self) -> int: ...\r
+ def readable(self) -> bool: ...\r
+ def seekable(self) -> bool: ...\r
+ def writable(self) -> bool: ...\r