From 9aa64fdc22b3c7c12fa4546093a634054793c671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20M=C3=B8ller?= Date: Sun, 27 Mar 2022 05:41:25 +0200 Subject: [PATCH] requests: Update adapters.pyi (#7544) The cert can be * A string / bytes which is a path to a certfile * A tuple with two string / bytes, where the first is the certfile and the second is a keyfile * None (optional) The tuple could be anything indexable, but there are strict requirement to actualle have two items, don't know if there is something more generic See https://github.com/psf/requests/blob/main/requests/adapters.py#L242-L248 --- stubs/requests/requests/adapters.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stubs/requests/requests/adapters.pyi b/stubs/requests/requests/adapters.pyi index 575525ea2..834002d0a 100644 --- a/stubs/requests/requests/adapters.pyi +++ b/stubs/requests/requests/adapters.pyi @@ -1,4 +1,4 @@ -from typing import Any, Container, Mapping, Text +from typing import Any, Mapping, Text from urllib3 import exceptions as urllib3_exceptions, poolmanager, response from urllib3.util import retry @@ -43,7 +43,7 @@ class BaseAdapter: stream: bool = ..., timeout: None | float | tuple[float, float] | tuple[float, None] = ..., verify: bool | str = ..., - cert: None | bytes | Text | Container[bytes | Text] = ..., + cert: None | bytes | Text | tuple[bytes | Text, bytes | Text] = ..., proxies: Mapping[str, str] | None = ..., ) -> Response: ... def close(self) -> None: ... @@ -72,6 +72,6 @@ class HTTPAdapter(BaseAdapter): stream: bool = ..., timeout: None | float | tuple[float, float] | tuple[float, None] = ..., verify: bool | str = ..., - cert: None | bytes | Text | Container[bytes | Text] = ..., + cert: None | bytes | Text | tuple[bytes | Text, bytes | Text] = ..., proxies: Mapping[str, str] | None = ..., ) -> Response: ...