Skip to content

Commit

Permalink
chore: remove click.echo from pipenv/routines/outdated.py
Browse files Browse the repository at this point in the history
Signed-off-by: Oz Tiram <[email protected]>
  • Loading branch information
oz123 committed Mar 6, 2025
1 parent 1d43196 commit b4224ff
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pipenv/routines/outdated.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from pipenv.patched.pip._vendor.packaging.utils import canonicalize_name
from pipenv.patched.pip._vendor.packaging.version import parse as parse_version
from pipenv.routines.lock import do_lock
from pipenv.utils import console, err
from pipenv.utils.dependencies import (
as_pipfile,
expansive_install_req_from_line,
get_version,
pep423_name,
)
from pipenv.vendor import click


def do_outdated(project, pypi_mirror=None, pre=False, clear=False):
Expand Down Expand Up @@ -77,17 +77,15 @@ def do_outdated(project, pypi_mirror=None, pre=False, clear=False):
pipfile_version_text = f" ({version} set in Pipfile)"
else:
pipfile_version_text = " (Unpinned in Pipfile)"
click.secho(
f"Skipped Update of Package {package!s}:"
err.print(
f"[yellow]Skipped Update of Package {package!s}:"
f" {old_version!s} installed,{required!s}{pipfile_version_text!s}, "
f"{new_version!s} available.",
fg="yellow",
err=True,
f"{new_version!s} available.[/yellow]"
)
for package, old_version, new_version in set(outdated).union(set(skipped)):
click.echo(
console.print(
f"Package {package!r} out-of-date: {old_version!r} installed, {new_version!r} available."
)
if not outdated:
click.echo(click.style("All packages are up to date!", fg="green", bold=True))
console.print("[bold green]All packages are up to date![/bold green]")
sys.exit(bool(outdated))

0 comments on commit b4224ff

Please sign in to comment.