Fixing typing for _ResponseHookT for requests instrumentation. #2041
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a typing error for the request hook of the requests instrumentation.
The type for this callable is defined here:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py
Line 90 in eb6024c
But as we can see on this line: https://github.com/open-telemetry/opentelemetry-python-contrib/blob/eb6024ca3171072daa5d842d9363e41d72ee64a6/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L211C24-L211C24, the number of arguments don't match. This PR fixes the problem.
Type of change
How Has This Been Tested?
This PR was not tested, it's only about type hinting. It's a trivial one-liner. Moreover, the request and response hooks for the requests library aren't mentioned in the docs (AFAIK) so I don't think this PR needs a doc update.
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.