@click.command()
@click.option('-f', '--fix-in-place', default=False, is_flag=True, help='Fix the issues found.')
@click.option('-m', '--modified-files', default=False, is_flag=True, help='Check modified files (according to git) only.')
@click.option('-v', '--verbose', default=False, is_flag=True, help='Print all the errors found.')
def main(fix_in_place, modified_files, verbose):
    repo = git.Repo('.', search_parent_directories=True)
    os.chdir(repo.working_tree_dir)
    sources_to_check = find_files_to_check(modified_files, repo.working_tree_dir)
    num_failed_files = check_files(sources_to_check, fix_in_place, verbose)
    if num_failed_files:
        print((((((Colors.RED + (3 * Symbols.FAIL)) + ' ') + str(num_failed_files)) + ' files have formatting errors.') + Colors.END))
        if fix_in_place:
            print('The formatting errors have been automatically fixed.')
        sys.exit(1)
    print((((Colors.GREEN + (3 * Symbols.PASS)) + Colors.END) + ' All files are properly formatted!'))
    sys.exit(0)
@click.command()
@click.option('-f', '--fix-in-place', default=False, is_flag=True, help='Fix the issues found.')
@click.option('-m', '--modified-files', default=False, is_flag=True, help='Check modified files (according to git) only.')
@click.option('-v', '--verbose', default=False, is_flag=True, help='Print all the errors found.')
def main(fix_in_place, modified_files, verbose):
    repo = git.Repo('.', search_parent_directories=True)
    os.chdir(repo.working_tree_dir)
    sources_to_check = find_files_to_check(modified_files, repo.working_tree_dir)
    num_failed_files = check_files(sources_to_check, fix_in_place, verbose)
    if num_failed_files:
        print((((((Colors.RED + (3 * Symbols.FAIL)) + ' ') + str(num_failed_files)) + ' files have formatting errors.') + Colors.END))
        if fix_in_place:
            print('The formatting errors have been automatically fixed.')
        sys.exit(1)
    print((((Colors.GREEN + (3 * Symbols.PASS)) + Colors.END) + ' All files are properly formatted!'))
    sys.exit(0)