usort/cli.py
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

    Check imports for one or more path
    
Check imports for one or more path
Check imports for one or more path
def check(filenames: List[str]) -> int:
    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
def check ( filenames : List [ str ] ) -> int : 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
Check imports for one or more path
Check imports for one or more path
"""
    Check imports for one or more path
    """
filenames
List[str]