Esempio n. 1
0
class Emoji:
    """A collection of emoji characters used in terminal output"""

    if supports_unicode():  # type: ignore
        SUCC = "🎉"
        LOCK = "🔒"
    else:
        SUCC = ""
        LOCK = ""
Esempio n. 2
0
        try:
            yield logger
        except Exception:
            if self.verbosity < self.DETAIL:
                self.echo(
                    self.yellow(f"See {file_name} for detailed debug log."))
            raise
        else:
            try:
                os.remove(file_name)
            except OSError:
                pass

    @contextlib.contextmanager
    def open_spinner(self, title: str, spinner: str = "dots"):
        if self.verbosity >= self.DETAIL or not self.supports_ansi:
            bar = DummySpinner()
        else:
            bar = halo.Halo(title, spinner=spinner, indent=self._indent)
        with bar as bar:
            yield bar


stream = IOStream()
if supports_unicode():
    CELE = "🎉"
    LOCK = "🔒"
else:
    CELE = ""
    LOCK = ""