(text: str, extra: int = 0, skip: bool = False)
Prints a binary in-progress / done bar

    Usage example:
      mark_done = echo_progress("Installing foo")
      install_foo()
      mark_done()

    :param extra: Number of unprinted characters in text (each ANSI code point is 4 characters)
    :param skip: If true, "Skipped" is printed instead, and callback is a no-op
Prints a binary in-progress / done bar
Prints a binary in - progress / done bar
def echo_progress(text: str, extra: int = 0, skip: bool = False) -> Callable[[], None]:
    """
    Prints a binary in-progress / done bar

    Usage example:
      mark_done = echo_progress("Installing foo")
      install_foo()
      mark_done()

    :param extra: Number of unprinted characters in text (each ANSI code point is 4 characters)
    :param skip: If true, "Skipped" is printed instead, and callback is a no-op
    """
    width = PRINT_WIDTH - 3 - SETUP_WIDTH + ANSI_WIDTH + extra
    logging.info(text)
    leader = style("".ljust(width - len(text), LEADER_CHAR), dim=True)

    if skip:
        secho(f"{text}{leader} {style(SKIP_TEXT, dim=True)}", err=True, dim=True)
        return lambda: None
    else:
        secho(f"{text}{leader} {SETUP_TEXT}", nl=False, err=True, dim=True)
        return lambda: secho(f"{RESET_TEXT}{DONE_TEXT}", err=True, dim=True)
def echo_progress ( text : str , extra : int = 0 , skip : bool = False ) -> Callable [ [ ] , None ] : width = PRINT_WIDTH - 3 - SETUP_WIDTH + ANSI_WIDTH + extra logging . info ( text ) leader = style ( "" . ljust ( width - len ( text ) , LEADER_CHAR ) , dim = True ) if skip : secho ( f"{text}{leader} {style(SKIP_TEXT, dim=True)}" , err = True , dim = True ) return lambda : None else : secho ( f"{text}{leader} {SETUP_TEXT}" , nl = False , err = True , dim = True ) return lambda : secho ( f"{RESET_TEXT}{DONE_TEXT}" , err = True , dim = True )