Skip to content

Commit

Permalink
chore: remove click.echo from pipenv/routines/lock.py
Browse files Browse the repository at this point in the history
Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
  • Loading branch information
oz123 committed Mar 6, 2025
1 parent 199a556 commit 5d6c6a9
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions pipenv/routines/lock.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import contextlib

from pipenv.utils import err
from pipenv.utils.dependencies import (
get_pipfile_category_using_lockfile_section,
)
from pipenv.vendor import click


def do_lock(
Expand Down Expand Up @@ -48,14 +48,7 @@ def do_lock(

if write:
if not quiet: # Alert the user of progress.
click.echo(
"{} {} {}".format(
click.style("Locking"),
click.style(f"[{pipfile_category}]", fg="yellow"),
click.style("dependencies..."),
),
err=True,
)
err.print(f"Locking [yellow]{pipfile_category}[/yellow] dependencies...")

# Prune old lockfile category as new one will be created.
with contextlib.suppress(KeyError):
Expand Down Expand Up @@ -91,14 +84,8 @@ def do_lock(
lockfile.update({"_meta": project.get_lockfile_meta()})
project.write_lockfile(lockfile)
if not quiet:
click.echo(
"{}".format(
click.style(
f"Updated Pipfile.lock ({project.get_lockfile_hash()})!",
bold=True,
)
),
err=True,
err.print(
f"[bold]Updated Pipfile.lock ({project.get_lockfile_hash()})![/bold]",
)
else:
return lockfile
Expand Down

0 comments on commit 5d6c6a9

Please sign in to comment.