8000 `requests.Session`: Allow passing of a single hook instead of a list of hooks by UncleOwen · Pull Request #7094 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

requests.Session: Allow passing of a single hook instead of a list of hooks #7094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow passing of a single hook instead of a list of hooks
  • Loading branch information
UncleOwen committed Jan 31, 2022
commit 91d40051fd81242b940fbdd6269a859871220ef0
2 changes: 1 addition & 1 deletion stubs/requests/requests/sessions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SessionRedirectMixin:
_Data = Union[None, Text, bytes, Mapping[str, Any], Mapping[Text, Any], Iterable[tuple[Text, Optional[Text]]], IO[Any]]

_Hook = Callable[[Response], Any]
_Hooks = MutableMapping[Text, list[_Hook]]
_Hooks = MutableMapping[Text, _Hook | list[_Hook]]
_HooksInput = MutableMapping[Text, Union[Iterable[_Hook], _Hook]]

_ParamsMappingKeyType = Union[Text, bytes, int, float]
Expand Down
0