mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Allow requests to have timeout: Tuple[float, None] (#3612)
This commit is contained in:
committed by
Sebastian Rittau
parent
1421fb1074
commit
c4bdd90d86
4
third_party/2and3/requests/adapters.pyi
vendored
4
third_party/2and3/requests/adapters.pyi
vendored
@@ -47,7 +47,7 @@ class BaseAdapter:
|
||||
def send(self,
|
||||
request: PreparedRequest,
|
||||
stream: bool = ...,
|
||||
timeout: Union[None, float, Tuple[float, float]] = ...,
|
||||
timeout: Union[None, float, Tuple[float, float], Tuple[float, None]] = ...,
|
||||
verify: Union[bool, str] = ...,
|
||||
cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]] = ...,
|
||||
proxies: Optional[Mapping[str, str]] = ...) -> Response: ...
|
||||
@@ -73,7 +73,7 @@ class HTTPAdapter(BaseAdapter):
|
||||
def send(self,
|
||||
request: PreparedRequest,
|
||||
stream: bool = ...,
|
||||
timeout: Union[None, float, Tuple[float, float]] = ...,
|
||||
timeout: Union[None, float, Tuple[float, float], Tuple[float, None]] = ...,
|
||||
verify: Union[bool, str] = ...,
|
||||
cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]] = ...,
|
||||
proxies: Optional[Mapping[str, str]] = ...) -> Response: ...
|
||||
|
||||
2
third_party/2and3/requests/sessions.pyi
vendored
2
third_party/2and3/requests/sessions.pyi
vendored
@@ -86,7 +86,7 @@ class Session(SessionRedirectMixin):
|
||||
cookies: Union[None, RequestsCookieJar, MutableMapping[Text, Text]] = ...,
|
||||
files: Optional[MutableMapping[Text, IO[Any]]] = ...,
|
||||
auth: Union[None, Tuple[Text, Text], _auth.AuthBase, Callable[[Request], Request]] = ...,
|
||||
timeout: Union[None, float, Tuple[float, float]] = ...,
|
||||
timeout: Union[None, float, Tuple[float, float], Tuple[float, None]] = ...,
|
||||
allow_redirects: Optional[bool] = ...,
|
||||
proxies: Optional[MutableMapping[Text, Text]] = ...,
|
||||
hooks: Optional[_HooksInput] = ...,
|
||||
|
||||
Reference in New Issue
Block a user