Add type hints to test.test_response
MODIFY
noxfile.py
noxfile.py
@@ -190,6 +190,7 @@ def mypy(session: nox.Session) -> None:
"test/test_poolmanager.py",
"test/test_proxymanager.py",
"test/test_queue_monkeypatch.py",
+ "test/test_response.py",
"test/test_retry.py",
"test/test_ssl.py",
"test/test_util.py",

MODIFY
src/urllib3/exceptions.py
src/urllib3/exceptions.py
@@ -309,7 +309,7 @@ class IncompleteRead(HTTPError, httplib_IncompleteRead):
class InvalidChunkLength(HTTPError, httplib_IncompleteRead):
"""Invalid chunk length in a chunked response."""
- def __init__(self, response: "HTTPResponse", length: int) -> None:
+ def __init__(self, response: "HTTPResponse", length: bytes) -> None:
self.partial: int = response.tell()
self.expected: Optional[int] = response.length_remaining
self.response = response

Add type hints to test.test_response