Skip to content

Commit

Permalink
Add initial_progress to _raw_progress_bar
Browse files Browse the repository at this point in the history
Signed-off-by: gmargaritis <[email protected]>
  • Loading branch information
gmargaritis committed Oct 30, 2024
1 parent 0b86d14 commit 2cfd8fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pip/_internal/cli/progress_bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ def _raw_progress_bar(
iterable: Iterable[bytes],
*,
size: Optional[int],
initial_progress: Optional[int] = None,
) -> Generator[bytes, None, None]:
def write_progress(current: int, total: int) -> None:
sys.stdout.write("Progress %d of %d\n" % (current, total))
sys.stdout.flush()

current = 0
current = initial_progress or 0
total = size or 0
rate_limiter = RateLimiter(0.25)

Expand Down
1 change: 1 addition & 0 deletions src/pip/_internal/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ def __init__(self, *, distribution: "BaseDistribution") -> None:
hint_stmt=None,
)


class InvalidInstalledPackage(DiagnosticPipError):
reference = "invalid-installed-package"

Expand Down

0 comments on commit 2cfd8fe

Please sign in to comment.