massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / urllib / response.pyi
1 # private module, we only expose what's needed\r
2 \r
3 from typing import BinaryIO, Iterable, List, Mapping, Optional, Type, TypeVar\r
4 from types import TracebackType\r
5 \r
6 _AIUT = TypeVar("_AIUT", bound=addbase)\r
7 \r
8 class addbase(BinaryIO):\r
9     def __enter__(self: _AIUT) -> _AIUT: ...\r
10     def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> bool: ...\r
11     def __iter__(self: _AIUT) -> _AIUT: ...\r
12     def __next__(self) -> bytes: ...\r
13     def close(self) -> None: ...\r
14     # These methods don't actually exist, but the class inherits at runtime from\r
15     # tempfile._TemporaryFileWrapper, which uses __getattr__ to delegate to the\r
16     # underlying file object. To satisfy the BinaryIO interface, we pretend that this\r
17     # class has these additional methods.\r
18     def fileno(self) -> int: ...\r
19     def flush(self) -> None: ...\r
20     def isatty(self) -> bool: ...\r
21     def read(self, n: int = ...) -> bytes: ...\r
22     def readable(self) -> bool: ...\r
23     def readline(self, limit: int = ...) -> bytes: ...\r
24     def readlines(self, hint: int = ...) -> List[bytes]: ...\r
25     def seek(self, offset: int, whence: int = ...) -> int: ...\r
26     def seekable(self) -> bool: ...\r
27     def tell(self) -> int: ...\r
28     def truncate(self, size: Optional[int] = ...) -> int: ...\r
29     def writable(self) -> bool: ...\r
30     def write(self, s: bytes) -> int: ...\r
31     def writelines(self, lines: Iterable[bytes]) -> None: ...\r
32 \r
33 class addinfo(addbase):\r
34     headers: Mapping[str, str]\r
35     def info(self) -> Mapping[str, str]: ...\r
36 \r
37 class addinfourl(addinfo):\r
38     url: str\r
39     code: int\r
40     def geturl(self) -> str: ...\r
41     def getcode(self) -> int: ...\r