massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / httplib2 / httplib2 / __init__.pyi
1 import http.client
2 from collections.abc import Generator
3 from typing import Any, Dict, TypeVar
4
5 from .error import *
6
7 # Should use _typeshed.Self when google/pytype#952 is fixed.
8 Self = TypeVar("Self")  # noqa Y001
9
10 __author__: str
11 __copyright__: str
12 __contributors__: list[str]
13 __license__: str
14 __version__: str
15
16 debuglevel: int
17 RETRIES: int
18
19 class Authentication:
20     path: Any
21     host: Any
22     credentials: Any
23     http: Any
24     def __init__(self, credentials, host, request_uri, headers, response, content, http) -> None: ...
25     def depth(self, request_uri): ...
26     def inscope(self, host, request_uri): ...
27     def request(self, method, request_uri, headers, content) -> None: ...
28     def response(self, response, content): ...
29     def __eq__(self, auth): ...
30     def __ne__(self, auth): ...
31     def __lt__(self, auth): ...
32     def __gt__(self, auth): ...
33     def __le__(self, auth): ...
34     def __ge__(self, auth): ...
35     def __bool__(self): ...
36
37 class BasicAuthentication(Authentication):
38     def __init__(self, credentials, host, request_uri, headers, response, content, http) -> None: ...
39     def request(self, method, request_uri, headers, content) -> None: ...
40
41 class DigestAuthentication(Authentication):
42     challenge: Any
43     A1: Any
44     def __init__(self, credentials, host, request_uri, headers, response, content, http) -> None: ...
45     def request(self, method, request_uri, headers, content, cnonce: Any | None = ...): ...
46     def response(self, response, content): ...
47
48 class HmacDigestAuthentication(Authentication):
49     challenge: Any
50     hashmod: Any
51     pwhashmod: Any
52     key: Any
53     def __init__(self, credentials, host, request_uri, headers, response, content, http) -> None: ...
54     def request(self, method, request_uri, headers, content) -> None: ...
55     def response(self, response, content): ...
56
57 class WsseAuthentication(Authentication):
58     def __init__(self, credentials, host, request_uri, headers, response, content, http) -> None: ...
59     def request(self, method, request_uri, headers, content) -> None: ...
60
61 class GoogleLoginAuthentication(Authentication):
62     Auth: str
63     def __init__(self, credentials, host, request_uri, headers, response, content, http) -> None: ...
64     def request(self, method, request_uri, headers, content) -> None: ...
65
66 class FileCache:
67     cache: Any
68     safe: Any
69     def __init__(self, cache, safe=...) -> None: ...
70     def get(self, key): ...
71     def set(self, key, value) -> None: ...
72     def delete(self, key) -> None: ...
73
74 class Credentials:
75     credentials: Any
76     def __init__(self) -> None: ...
77     def add(self, name, password, domain: str = ...) -> None: ...
78     def clear(self) -> None: ...
79     def iter(self, domain) -> Generator[tuple[str, str], None, None]: ...
80
81 class KeyCerts(Credentials):
82     def add(self, key, cert, domain, password) -> None: ...  # type: ignore
83     def iter(self, domain) -> Generator[tuple[str, str, str], None, None]: ...  # type: ignore
84
85 class AllHosts: ...
86
87 class ProxyInfo:
88     bypass_hosts: Any
89     def __init__(
90         self,
91         proxy_type,
92         proxy_host,
93         proxy_port,
94         proxy_rdns: bool = ...,
95         proxy_user: Any | None = ...,
96         proxy_pass: Any | None = ...,
97         proxy_headers: Any | None = ...,
98     ) -> None: ...
99     def astuple(self): ...
100     def isgood(self): ...
101     def applies_to(self, hostname): ...
102     def bypass_host(self, hostname): ...
103
104 class HTTPConnectionWithTimeout(http.client.HTTPConnection):
105     proxy_info: Any
106     def __init__(self, host, port: Any | None = ..., timeout: Any | None = ..., proxy_info: Any | None = ...) -> None: ...
107     sock: Any
108     def connect(self) -> None: ...
109
110 class HTTPSConnectionWithTimeout(http.client.HTTPSConnection):
111     disable_ssl_certificate_validation: Any
112     ca_certs: Any
113     proxy_info: Any
114     key_file: Any
115     cert_file: Any
116     key_password: Any
117     def __init__(
118         self,
119         host,
120         port: Any | None = ...,
121         key_file: Any | None = ...,
122         cert_file: Any | None = ...,
123         timeout: Any | None = ...,
124         proxy_info: Any | None = ...,
125         ca_certs: Any | None = ...,
126         disable_ssl_certificate_validation: bool = ...,
127         tls_maximum_version: Any | None = ...,
128         tls_minimum_version: Any | None = ...,
129         key_password: Any | None = ...,
130     ) -> None: ...
131     sock: Any
132     def connect(self) -> None: ...
133
134 class Http:
135     proxy_info: Any
136     ca_certs: Any
137     disable_ssl_certificate_validation: Any
138     tls_maximum_version: Any
139     tls_minimum_version: Any
140     connections: Any
141     cache: Any
142     credentials: Any
143     certificates: Any
144     authorizations: Any
145     follow_redirects: bool
146     redirect_codes: Any
147     optimistic_concurrency_methods: Any
148     safe_methods: Any
149     follow_all_redirects: bool
150     ignore_etag: bool
151     force_exception_to_status_code: bool
152     timeout: Any
153     forward_authorization_headers: bool
154     def __init__(
155         self,
156         cache: Any | None = ...,
157         timeout: Any | None = ...,
158         proxy_info=...,
159         ca_certs: Any | None = ...,
160         disable_ssl_certificate_validation: bool = ...,
161         tls_maximum_version: Any | None = ...,
162         tls_minimum_version: Any | None = ...,
163     ) -> None: ...
164     def close(self) -> None: ...
165     def add_credentials(self, name, password, domain: str = ...) -> None: ...
166     def add_certificate(self, key, cert, domain, password: Any | None = ...) -> None: ...
167     def clear_credentials(self) -> None: ...
168     def request(
169         self,
170         uri,
171         method: str = ...,
172         body: Any | None = ...,
173         headers: Any | None = ...,
174         redirections=...,
175         connection_type: Any | None = ...,
176     ): ...
177
178 class Response(Dict[str, Any]):
179     fromcache: bool
180     version: int
181     status: int
182     reason: str
183     previous: Any
184     def __init__(self, info) -> None: ...
185     @property
186     def dict(self: Self) -> Self: ...