Skip to content

Commit

Permalink
replace click.style in PipenvFileError
Browse files Browse the repository at this point in the history
  • Loading branch information
aidencullo committed Aug 2, 2024
1 parent b7dbd47 commit 25f1924
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pipenv/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ def show(self, file=None):


class PipenvFileError(FileError):
formatted_message = "{} {{}} {{}}".format(click.style("ERROR:", fg="red", bold=True))
formatted_message = "{} {{}} {{}}".format("[bold red]ERROR:[/bold red]")

def __init__(self, filename, message=None, **kwargs):
extra = kwargs.pop("extra", [])
if not message:
message = click.style("Please ensure that the file exists!", bold=True)
message = "[bold]Please ensure that the file exists![/bold]"
message = self.formatted_message.format(
click.style(f"{filename} not found!", bold=True), message
f"[bold]{filename} not found![/bold]", message
)
FileError.__init__(self, filename=filename, hint=message, **kwargs)
self.extra = extra
Expand Down

0 comments on commit 25f1924

Please sign in to comment.