Exemple #1
0
 def warn(text):
     for line in text.splitlines():
         secho(line, fg="white", bg="red", bold=True)
 def warn(text):
     for line in text.splitlines():
         secho(line, fg="white", bg="red", bold=True)
Exemple #3
0
 def note(text):
     for line in text.splitlines():
         secho(line, fg="yellow", bold=True)
Exemple #4
0
def echo_wrap(text: str, **kwargs: Any) -> None:
    """Prints a wrapped paragraph"""
    secho(wrap(text), err=True, **kwargs)
Exemple #5
0
def echo_newline() -> None:
    """
    Prints an informational newline (printed to stderr)
    """
    secho("", err=True)
Exemple #6
0
def echo_success(text: str, indent: str = "") -> None:
    logging.info(text)
    secho(wrap(f"{indent}✔ {text}"), fg=Colors.SUCCESS, err=True)
Exemple #7
0
def echo_warning(text: str, indent: str = "") -> None:
    logging.warning(text)
    secho(wrap(f"{indent}⚠ {text}"), fg=Colors.WARNING, err=True)
Exemple #8
0
def echo_error(text: str, indent: str = "") -> None:
    logging.error(text)
    secho(wrap(f"{indent}✘ {text}"), fg=Colors.ERROR, err=True)