Skip to content

Commit

Permalink
Annotate response attribute length_remaining in BaseHTTPResponse (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
programmer-ke committed Jan 29, 2024
1 parent d7bb83b commit 6d2f0f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/urllib3/connectionpool.py
Expand Up @@ -556,7 +556,7 @@ def _make_request(
# HTTP version
http_version,
response.status,
response.length_remaining, # type: ignore[attr-defined]
response.length_remaining,
)

return response
Expand Down
1 change: 1 addition & 0 deletions src/urllib3/response.py
Expand Up @@ -344,6 +344,7 @@ def __init__(
self.chunked = True

self._decoder: ContentDecoder | None = None
self.length_remaining: int | None

def get_redirect_location(self) -> str | None | Literal[False]:
"""
Expand Down

0 comments on commit 6d2f0f6

Please sign in to comment.