Skip to content

Commit

Permalink
feat(cli): add print_error function to highlight errors in console (#123
Browse files Browse the repository at this point in the history
)
  • Loading branch information
afuetterer authored Jun 3, 2024
1 parent 943b1a9 commit e8c7cfe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/re3data/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@

console = Console()


def print_error(message: str) -> None:
"""Print an error message to the console in bold red.
Args:
message: The error message to be printed.
Returns:
None
"""
console.print(message, style="bold red")


CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]}

app = typer.Typer(no_args_is_help=True, context_settings=CONTEXT_SETTINGS)
Expand Down

0 comments on commit e8c7cfe

Please sign in to comment.