usort/cli.py
def format(filenames: List[str]) -> int:
    """
    Format one or more paths

    This is intended to sort nodes separated by barriers, and that's it.
    We don't format them (aside from moving comments).  Black does the rest.
    When in doubt leave lines alone.
    """
    if not filenames:
        raise click.ClickException("Provide some filenames")

    if filenames[0].strip() == "-":
        success = usort_stdin()
        return 0 if success else 1

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

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

            if result.content != result.output:
                click.echo(f"Sorted {result.path}")

            print_benchmark(result.timings)

    return return_code

    Format one or more paths

    This is intended to sort nodes separated by barriers, and that's it.
    We don't format them (aside from moving comments).  Black does the rest.
    When in doubt leave lines alone.
    
Format one or more paths
This is intended to sort nodes separated by barriers, and that's it.
We don't format them (aside from moving comments).  Black does the rest.
When in doubt leave lines alone.
Format one or more paths This is intended to sort nodes separated by barriers and that ' s it . We don ' t format them ( aside from moving comments ) . Black does the rest . When in doubt leave lines alone .
def format(filenames: List[str]) -> int:
    if not filenames:
        raise click.ClickException("Provide some filenames")
    if filenames[0].strip() == "-":
        success = usort_stdin()
        return 0 if success else 1
    return_code = 0
    for f in filenames:
        path = Path(f)
        for result in usort_path(path, write=True):
            if result.error:
                click.echo(f"Error sorting {result.path}: {result.error}")
                return_code |= 1
                continue
            for warning in result.warnings:
                click.echo(f"Warning at {result.path}:{warning.line} {warning.message}")
            if result.content != result.output:
                click.echo(f"Sorted {result.path}")
            print_benchmark(result.timings)
    return return_code
def format ( filenames : List [ str ] ) -> int : if not filenames : raise click . ClickException ( "Provide some filenames" ) if filenames [ 0 ] . strip ( ) == "-" : success = usort_stdin ( ) return 0 if success else 1 return_code = 0 for f in filenames : path = Path ( f ) for result in usort_path ( path , write = True ) : if result . error : click . echo ( f"Error sorting {result.path}: {result.error}" ) return_code |= 1 continue for warning in result . warnings : click . echo ( f"Warning at {result.path}:{warning.line} {warning.message}" ) if result . content != result . output : click . echo ( f"Sorted {result.path}" ) print_benchmark ( result . timings ) return return_code
Format one or more paths
This is intended to sort nodes separated by barriers, and that's it.
Format one or more paths This is intended to sort nodes separated by barriers and that ' s it .
"""
    Format one or more paths

    This is intended to sort nodes separated by barriers, and that's it.
    We don't format them (aside from moving comments).  Black does the rest.
    When in doubt leave lines alone.
    """
filenames
List[str]