Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion responses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ def activate(self, func: "_F" = ...) -> "_F":
"""Overload for scenario when 'responses.activate' is used."""

@overload
def activate( # type: ignore[misc]
def activate(
self,
*,
registry: Type[Any] = ...,
Expand Down
2 changes: 1 addition & 1 deletion responses/_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

import yaml

from responses import _UNSET
from responses import RequestsMock
from responses import Response
from responses import _real_send
from responses import _UNSET
from responses.registries import OrderedRegistry


Expand Down
2 changes: 1 addition & 1 deletion responses/tests/test_matchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def run():

class TestHeaderWithRegex:
@property
def url(self): # type: ignore[misc]
def url(self) -> str:
return "http://example.com/"

def _register(self):
Expand Down
8 changes: 4 additions & 4 deletions responses/tests/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,12 +926,12 @@ def test_function(a, b=None):


@pytest.fixture
def my_fruit(): # type: ignore[misc]
def my_fruit() -> str:
return "apple"


@pytest.fixture
def fruit_basket(my_fruit): # type: ignore[misc]
def fruit_basket(my_fruit: str) -> "list[str]":
return ["banana", my_fruit]


Expand Down Expand Up @@ -1333,7 +1333,7 @@ def test_handles_buffered_reader_body():

@responses.activate
def run():
responses.add(responses.GET, url, body=BufferedReader(BytesIO(b"test"))) # type: ignore
responses.add(responses.GET, url, body=BufferedReader(BytesIO(b"test")))

resp = requests.get(url)

Expand Down Expand Up @@ -1558,7 +1558,7 @@ def run():
responses.add(
responses.GET,
url,
body=BufferedReader(BytesIO(b"testing")), # type: ignore
body=BufferedReader(BytesIO(b"testing")),
auto_calculate_content_length=True,
)
resp = requests.get(url)
Expand Down
Loading