Skip to content
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

fix types #684

Merged
merged 3 commits into from
Oct 21, 2023
Merged

fix types #684

merged 3 commits into from
Oct 21, 2023

Conversation

beliaev-maksim
Copy link
Collaborator

@beliaev-maksim beliaev-maksim commented Oct 20, 2023

  • remove dependency on urllib3 vendored in requests since it is not maintained anymore. See requests.packages missing in types-requests 2.27.5 python/typeshed#6893 (comment)
  • new version of mypy does not require overloads for type checking. mypy errors and complains that overload itself has Any argument (which is obvious). In theory we can suppress the error with the comment, but at the same time we can just remove overloads as not required. Do not have strong opinion on this.

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
responses/__init__.py 100.00% <100.00%> (ø)
responses/matchers.py 100.00% <100.00%> (ø)
responses/tests/test_responses.py 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

@markstory markstory merged commit 74466ec into getsentry:master Oct 21, 2023
16 checks passed
@howamith howamith mentioned this pull request Nov 5, 2023
Comment on lines -965 to -981
@overload
def activate(self, func: "_F" = ...) -> "_F":
"""Overload for scenario when 'responses.activate' is used."""

@overload
def activate(
self,
*,
registry: Type[Any] = ...,
assert_all_requests_are_fired: bool = ...,
) -> Callable[["_F"], "_F"]:
"""Overload for scenario when
'responses.activate(registry=, assert_all_requests_are_fired=True)' is used.

See https://github.com/getsentry/responses/pull/469 for more details
"""

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beliaev-maksim beliaev-maksim deleted the mbeliaev/fix_types branch November 14, 2023 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants