From 5d6c6a9cb651f127f98e7a42d1ea3a99cfaf41a6 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Mon, 9 Dec 2024 22:47:24 +0100 Subject: [PATCH] chore: remove click.echo from pipenv/routines/lock.py Signed-off-by: Oz Tiram --- pipenv/routines/lock.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pipenv/routines/lock.py b/pipenv/routines/lock.py index b29a73bbf..68a52265e 100644 --- a/pipenv/routines/lock.py +++ b/pipenv/routines/lock.py @@ -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( @@ -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): @@ -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