Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Feb 23, 2025
1 parent 0d5d6c6 commit 7125a88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/pip/_internal/network/lazy_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ def _fetch_content_length(self) -> int:

def fetch_content_range(self, start: int, end: int) -> Iterator[bytes]:
"""Perform a series of HTTP range requests to cover the specified byte range."""
for chunk in self._stream_response(start, end).iter_content(CONTENT_CHUNK_SIZE):
yield chunk
yield from self._stream_response(start, end).iter_content(CONTENT_CHUNK_SIZE)

def __enter__(self) -> LazyHTTPFile:
"""Fetch the remote file length and reset the log of downloaded intervals.
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ def do_GET(self) -> None:
# If no range given, return the whole file.
if range_arg is None or not self.range_handler.supports_range():
self._send_full_file_headers(ctype, full_file_length)
self.copyfile(f, self.wfile) # type: ignore[misc]
self.copyfile(f, self.wfile)
return
# Otherwise, return the requested contents.
assert m is not None
Expand Down Expand Up @@ -1289,7 +1289,7 @@ def do_GET(self) -> None:
if was_out_of_bounds:
if self.range_handler.overflows_negative_range():
self._send_full_file_headers(ctype, full_file_length)
self.copyfile(f, self.wfile) # type: ignore[misc]
self.copyfile(f, self.wfile)
return
self.send_response(http.HTTPStatus.REQUESTED_RANGE_NOT_SATISFIABLE)
self._send_basic_headers(ctype)
Expand Down
1 change: 1 addition & 0 deletions tests/functional/test_fast_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.utils.misc import hash_file

from tests.conftest import HTMLIndexWithRangeServer, RangeHandler
from tests.lib import PipTestEnvironment, TestData, TestPipResult

Expand Down

0 comments on commit 7125a88

Please sign in to comment.