Skip to content

Commit 8812a05

Browse files
committed
fix mypy failures
1 parent 9695880 commit 8812a05

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scrapy_zyte_api/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def replace(self, *args, **kwargs):
2121
return instance
2222

2323
@property
24-
def zyte_api_response(self) -> Dict:
24+
def zyte_api_response(self) -> Optional[Dict]:
2525
"""Contains the raw API response from Zyte API.
2626
2727
To see the full list of parameters and their description, kindly refer to the

tests/test_api_requests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def test_browser_html_request(self, meta: Dict[str, Dict[str, Any]]):
4444
coro = handler._download_request(req, Spider("test"))
4545
assert iscoroutine(coro)
4646
assert not isinstance(coro, Deferred)
47-
resp = await coro # NOQA
47+
resp = await coro # type: ignore
4848

4949
assert isinstance(resp, TextResponse)
5050
assert resp.request is req
@@ -81,7 +81,7 @@ async def test_http_response_body_request(self, meta: Dict[str, Dict[str, Any]])
8181
coro = handler._download_request(req, Spider("test"))
8282
assert iscoroutine(coro)
8383
assert not isinstance(coro, Deferred)
84-
resp = await coro # NOQA
84+
resp = await coro # type: ignore
8585

8686
assert isinstance(resp, Response)
8787
assert resp.request is req
@@ -109,7 +109,7 @@ async def test_http_response_headers_request(self, meta: Dict[str, Dict[str, Any
109109
coro = handler._download_request(req, Spider("test"))
110110
assert iscoroutine(coro)
111111
assert not isinstance(coro, Deferred)
112-
resp = await coro # NOQA
112+
resp = await coro # type: ignore
113113

114114
assert resp.request is req
115115
assert resp.url == req.url

0 commit comments

Comments
 (0)