Skip to content

Commit

Permalink
Replace vistir.misc.echo with click.secho
Browse files Browse the repository at this point in the history
The former is simply a copy paste of `click.echo`.

Since `click` has a much larger user base, it is likely
to correct all bugs on all OSes faster.
  • Loading branch information
oz123 committed Apr 23, 2022
1 parent 1ae2514 commit d5fe3fd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pipenv/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from pipenv.utils.indexes import prepare_pip_source_args
from pipenv.utils.processes import subprocess_run
from pipenv.utils.shell import make_posix, normalize_path
from pipenv.vendor import vistir
from pipenv.vendor import click, vistir
from pipenv.vendor.cached_property import cached_property
from pipenv.vendor.packaging.utils import canonicalize_name

Expand Down Expand Up @@ -410,8 +410,8 @@ def get_paths(self):
paths[key] = make_posix(paths[key])
return paths
else:
vistir.misc.echo(f"Failed to load paths: {c.stderr}", fg="yellow")
vistir.misc.echo(f"Output: {c.stdout}", fg="yellow")
click.echo(f"Failed to load paths: {c.stderr}", fg="yellow")
click.echo(f"Output: {c.stdout}", fg="yellow")

This comment has been minimized.

Copy link
@b-jazz

b-jazz May 9, 2022

Shouldn't these calls be to click.secho and not click.echo since there is no fg argument in the definition of click.echo, but the styled version (secho) does have that?

This comment has been minimized.

Copy link
@oz123

oz123 May 9, 2022

Author Contributor

Yes. That's correct. Typo.

return None

def get_lib_paths(self):
Expand Down Expand Up @@ -439,8 +439,8 @@ def get_lib_paths(self):
paths[key] = make_posix(paths[key])
return paths
else:
vistir.misc.echo(f"Failed to load paths: {c.stderr}", fg="yellow")
vistir.misc.echo(f"Output: {c.stdout}", fg="yellow")
click.secho(f"Failed to load paths: {c.stderr}", fg="yellow")
click.secho(f"Output: {c.stdout}", fg="yellow")
if not paths:
if not self.prefix.joinpath("lib").exists():
return {}
Expand Down Expand Up @@ -499,8 +499,8 @@ def get_include_path(self):
paths[key] = make_posix(paths[key])
return paths
else:
vistir.misc.echo(f"Failed to load paths: {c.stderr}", fg="yellow")
vistir.misc.echo(f"Output: {c.stdout}", fg="yellow")
click.secho(f"Failed to load paths: {c.stderr}", fg="yellow")
click.secho(f"Output: {c.stdout}", fg="yellow")
return None

@cached_property
Expand Down

0 comments on commit d5fe3fd

Please sign in to comment.