Skip to content

Commit aa780b2

Browse files
committed
feat(cli): add print_error function to highlight errors in console (#123)
1 parent 7667340 commit aa780b2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/re3data/_cli.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@
2323

2424
console = Console()
2525

26+
27+
def print_error(message: str) -> None:
28+
"""Print an error message to the console in bold red.
29+
30+
Args:
31+
message: The error message to be printed.
32+
33+
Returns:
34+
None
35+
"""
36+
console.print(message, style="bold red")
37+
38+
2639
CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]}
2740

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

0 commit comments

Comments
 (0)