def usort_command()

in usort/cli.py [0:0]


def usort_command(fn: Callable[..., int]) -> Callable[..., None]:
    """
    Run wrapped command, print timings if --benchmark, and exit with return code
    """

    @wraps(fn)
    def wrapper(*args: Any, **kwargs: Any) -> None:
        exit_code = fn(*args, **kwargs) or 0
        if BENCHMARK:
            print_timings(click.echo, timings=get_timings())
        sys.exit(exit_code)

    return wrapper