Skip to content

fix types#684

Merged
markstory merged 3 commits intogetsentry:masterfrom
beliaev-maksim:mbeliaev/fix_types
Oct 21, 2023
Merged

fix types#684
markstory merged 3 commits intogetsentry:masterfrom
beliaev-maksim:mbeliaev/fix_types

Conversation

@beliaev-maksim
Copy link
Copy Markdown
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
Copy Markdown

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!.

Comment thread responses/__init__.py
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
Copy Markdown

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