massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2 / cStringIO.pyi
1 # Stubs for cStringIO (Python 2.7)\r
2 # See https://docs.python.org/2/library/stringio.html\r
3 \r
4 from abc import ABCMeta\r
5 from typing import overload, IO, List, Iterable, Iterator, Optional, Union\r
6 from types import TracebackType\r
7 \r
8 # TODO the typing.IO[] generics should be split into input and output.\r
9 \r
10 # This class isn't actually abstract, but you can't instantiate it\r
11 # directly, so we might as well treat it as abstract in the stub.\r
12 class InputType(IO[str], Iterator[str], metaclass=ABCMeta):\r
13     def getvalue(self) -> str: ...\r
14     def close(self) -> None: ...\r
15     @property\r
16     def closed(self) -> bool: ...\r
17     def flush(self) -> None: ...\r
18     def isatty(self) -> bool: ...\r
19     def read(self, size: int = ...) -> str: ...\r
20     def readline(self, size: int = ...) -> str: ...\r
21     def readlines(self, hint: int = ...) -> List[str]: ...\r
22     def seek(self, offset: int, whence: int = ...) -> int: ...\r
23     def tell(self) -> int: ...\r
24     def truncate(self, size: Optional[int] = ...) -> int: ...\r
25     def __iter__(self) -> 'InputType': ...\r
26     def next(self) -> str: ...\r
27     def reset(self) -> None: ...\r
28 \r
29 \r
30 class OutputType(IO[str], Iterator[str], metaclass=ABCMeta):\r
31     @property\r
32     def softspace(self) -> int: ...\r
33     def getvalue(self) -> str: ...\r
34     def close(self) -> None: ...\r
35     @property\r
36     def closed(self) -> bool: ...\r
37     def flush(self) -> None: ...\r
38     def isatty(self) -> bool: ...\r
39     def read(self, size: int = ...) -> str: ...\r
40     def readline(self, size: int = ...) -> str: ...\r
41     def readlines(self, hint: int = ...) -> List[str]: ...\r
42     def seek(self, offset: int, whence: int = ...) -> int: ...\r
43     def tell(self) -> int: ...\r
44     def truncate(self, size: Optional[int] = ...) -> int: ...\r
45     def __iter__(self) -> 'OutputType': ...\r
46     def next(self) -> str: ...\r
47     def reset(self) -> None: ...\r
48     def write(self, b: Union[str, unicode]) -> int: ...\r
49     def writelines(self, lines: Iterable[Union[str, unicode]]) -> None: ...\r
50 \r
51 @overload\r
52 def StringIO() -> OutputType: ...\r
53 @overload\r
54 def StringIO(s: str) -> InputType: ...\r