def check()

in usort/cli.py [0:0]


def check(filenames: List[str]) -> int:
    """
    Check imports for one or more path
    """
    if not filenames:
        raise click.ClickException("Provide some filenames")

    return_code = 0
    for f in filenames:
        path = Path(f)
        for result in usort_path(path, write=False):
            if result.error:
                click.echo(f"Error sorting {result.path}: {result.error}")
                return_code |= 1

            for warning in result.warnings:
                click.echo(f"Warning at {result.path}:{warning.line} {warning.message}")

            if result.content != result.output:
                click.echo(f"Would sort {result.path}")
                return_code |= 2

            print_benchmark(result.timings)

    return return_code