Skip to content

Commit 0d30724

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent c5fc0a8 commit 0d30724

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

stubs/requests/requests/adapters.pyi

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,21 @@ class HTTPAdapter(BaseAdapter):
8686
maxsize: int,
8787
block: bool = False,
8888
**pool_kwargs: Any, # Any: Arbitrary keyword arguments passed directly to urllib3's PoolManager constructor.
89-
# Allowed types depend on urllib3 version, but typically include:
90-
# ssl_version (int), cert_reqs (str), ca_certs (str), ca_cert_dir (str),
91-
# ssl_context (ssl.SSLContext), socket_options (list), etc.
92-
# We use Any because the exact set is dynamic and not fully specified in stubs.
89+
# Allowed types depend on urllib3 version, but typically include:
90+
# ssl_version (int), cert_reqs (str), ca_certs (str), ca_cert_dir (str),
91+
# ssl_context (ssl.SSLContext), socket_options (list), etc.
92+
# We use Any because the exact set is dynamic and not fully specified in stubs.
9393
) -> None: ...
9494
def proxy_manager_for(
95-
self,
96-
proxy: str,
97-
**proxy_kwargs: Any # Any: Same as pool_kwargs above, passed to ProxyManager or SOCKSProxyManager.
98-
# May include: ssl_context, cert_reqs, ca_certs, ca_cert_dir, etc.
99-
) -> Any: # Any: Returns either urllib3.ProxyManager (for HTTP/HTTPS proxies) or SOCKSProxyManager (for SOCKS).
100-
# The exact return type depends on the proxy scheme and is not needed by callers; using Any avoids
101-
# circular imports or complex union types. In practice, the object adheres to a common interface.
95+
self,
96+
proxy: str,
97+
**proxy_kwargs: Any, # Any: Same as pool_kwargs above, passed to ProxyManager or SOCKSProxyManager.
98+
# May include: ssl_context, cert_reqs, ca_certs, ca_cert_dir, etc.
99+
) -> Any: # Any: Returns either urllib3.ProxyManager (for HTTP/HTTPS proxies) or SOCKSProxyManager (for SOCKS).
100+
# The exact return type depends on the proxy scheme and is not needed by callers; using Any avoids
101+
# circular imports or complex union types. In practice, the object adheres to a common interface.
102102
...
103+
103104
def cert_verify(self, conn, url, verify, cert): ...
104105
def build_response(self, req: PreparedRequest, resp: urllib3.BaseHTTPResponse) -> Response: ...
105106
def build_connection_pool_key_attributes(
@@ -119,10 +120,10 @@ class HTTPAdapter(BaseAdapter):
119120
def add_headers(
120121
self,
121122
request: PreparedRequest,
122-
**kwargs: Any # Any: Hook method for subclasses to add custom headers.
123-
# The kwargs mirror the send() parameters: stream (bool), timeout (float|tuple),
124-
# verify (bool|str), cert (str|tuple), proxies (dict). Base implementation ignores them.
125-
# Using Any allows subclasses to access these arguments without repeating the full signature.
123+
**kwargs: Any, # Any: Hook method for subclasses to add custom headers.
124+
# The kwargs mirror the send() parameters: stream (bool), timeout (float|tuple),
125+
# verify (bool|str), cert (str|tuple), proxies (dict). Base implementation ignores them.
126+
# Using Any allows subclasses to access these arguments without repeating the full signature.
126127
) -> None: ...
127128
def proxy_headers(self, proxy: str) -> dict[str, str]: ...
128129
def send(

0 commit comments

Comments
 (0)