-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `--list` option will go bye-bye in 1.0 - calling `bumpversion` without a subcomand will leave in 1.0
- Loading branch information
Showing
3 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
"""Utilities for user interface.""" | ||
from click import UsageError, echo | ||
from click import UsageError, secho | ||
|
||
|
||
def print_info(msg: str) -> None: | ||
"""Echo a message to the console.""" | ||
echo(msg) | ||
secho(msg) | ||
|
||
|
||
def print_error(msg: str) -> None: | ||
"""Raise an error and exit.""" | ||
raise UsageError(msg) | ||
|
||
|
||
def print_warning(msg: str) -> None: | ||
"""Echo a warning to the console.""" | ||
secho(f"\nWARNING:\n\n{msg}\n", fg="yellow") |