Skip to content

Commit

Permalink
chore: remove disabling of NO_COLOR on click echo
Browse files Browse the repository at this point in the history
rich respects the NO_COLOR  environment variable.

Signed-off-by: Oz Tiram <[email protected]>
  • Loading branch information
oz123 committed Dec 12, 2024
1 parent f78e7fd commit 2c0a948
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
9 changes: 0 additions & 9 deletions pipenv/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ def normalize_pipfile_path(p):
)


NO_COLOR = False
if os.getenv("NO_COLOR") or os.getenv("PIPENV_COLORBLIND"):
NO_COLOR = True
from pipenv.utils.shell import style_no_color
from pipenv.vendor import click

click.original_style = click.style
click.style = style_no_color

PIPENV_HIDE_EMOJIS = (
os.environ.get("PIPENV_HIDE_EMOJIS") is None
and (os.name == "nt" or PIPENV_IS_CI)
Expand Down
8 changes: 0 additions & 8 deletions pipenv/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from pipenv.utils import err
from pipenv.utils.fileutils import normalize_drive, normalize_path
from pipenv.vendor import click
from pipenv.vendor.pythonfinder.utils import ensure_path, parse_python_version

from .constants import FALSE_VALUES, SCHEME_LIST, TRUE_VALUES
Expand Down Expand Up @@ -367,13 +366,6 @@ def handle_remove_readonly(func, path, exc):
raise exc


def style_no_color(text, fg=None, bg=None, **kwargs) -> str:
"""Wrap click style to ignore colors."""
if hasattr(click, "original_style"):
return click.original_style(text, **kwargs)
return click.style(text, **kwargs)


def env_to_bool(val):
"""
Convert **val** to boolean, returning True if truthy or False if falsey
Expand Down

0 comments on commit 2c0a948

Please sign in to comment.