mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Remove unnecessary optionality for requests.Session (#1658)
Current code that initializes the things I've changed, to demonstrate that the object is initialized this way: * headers: https://github.com/requests/requests/blob/9713289e74/requests/sessions.py#L345 * proxies: https://github.com/requests/requests/blob/9713289e74/requests/sessions.py#L354 * hooks: https://github.com/requests/requests/blob/9713289e74/requests/sessions.py#L357 * params: https://github.com/requests/requests/blob/9713289e74/requests/sessions.py#L362 * cookies: https://github.com/requests/requests/blob/9713289e74/requests/sessions.py#L388 from what I can tell nothing in the official requests API ever creates a session other than through `__init__`.
This commit is contained in:
committed by
Jelle Zijlstra
parent
9439ec4e4f
commit
a1238294d7
4
third_party/2and3/requests/sessions.pyi
vendored
4
third_party/2and3/requests/sessions.pyi
vendored
@@ -64,13 +64,13 @@ class Session(SessionRedirectMixin):
|
||||
auth = ... # type: Union[None, Tuple[Text, Text], Callable[[Request], Request]]
|
||||
proxies = ... # type: MutableMapping[Text, Text]
|
||||
hooks = ... # type: _Hooks
|
||||
params = ... # type: Union[None, bytes, MutableMapping[Text, Text]]
|
||||
params = ... # type: Union[bytes, MutableMapping[Text, Text]]
|
||||
stream = ... # type: bool
|
||||
verify = ... # type: bool
|
||||
cert = ... # type: Union[None, Text, Tuple[Text, Text]]
|
||||
max_redirects = ... # type: int
|
||||
trust_env = ... # type: bool
|
||||
cookies = ... # type: Union[None, RequestsCookieJar, MutableMapping[Text, Text]]
|
||||
cookies = ... # type: Union[RequestsCookieJar, MutableMapping[Text, Text]]
|
||||
adapters = ... # type: MutableMapping
|
||||
redirect_cache = ... # type: RecentlyUsedContainer
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user