def main():
    parser = optparse.OptionParser(
        usage="%%prog [--options] [<path>..]\n\n%s" % __doc__.strip(),
    )
    parser.add_option(
        '--scm', dest='scmhandler', default=None,
        help='SCM to use to choose which lines and files to check. '
             'Currently only "git" is supported.',
    )
    parser.add_option(
        '-i', '--ignore', dest='ignores',
        action='append', default=[], metavar='PATTERN',
        help='fnmatch pattern to ignore.',
    )
    parser.add_option(
        '--list-checkers', dest='list_checkers',
        action='store_true', default=False,
        help='List installed checkers and their external tools.',
    )
    parser.add_option(
        '-r', '--rev', dest='rev',
        action='store', default=None,
        help='Revision to pass to scm tool. Used with --scm. '
             'If not specified, the current pending changes will '
             'be used, as determined by the scm tool specified.',
    )
    parser.add_option(
        '--verbose', dest='verbose',
        action='store_true', default=False,
        help='Prints extra information to stderr.',
    )
    parser.add_option(
        '--ignore-untracked', dest='ignore_untracked',
        action='store_true', default=False,
        help='Ignore untracked files (only applicable if using scm).',
    )

    options, paths = parser.parse_args()

    try:
        errs = CodeQuality(options).codequality(paths)
        if errs:
            return 1
    except CommandError, e:
        print >> sys.stderr, e % 'Error: %s'
        return 1
    return 0
dataset/ETHPy150Open jenanwise/codequality/codequality/main.py/main/swapped operands of `%`