def main():
    parser = argparse.ArgumentParser(description='Compare fonts or ttxn output '
                                     'pointed to by PATH_A and PATH_B.')
    parser.add_argument('path_a', metavar='PATH_A')
    parser.add_argument('path_b', metavar='PATH_B')
    parser.add_argument('-t', '--diff-type', default='area',
                        choices=('area', 'rendered', 'gpos', 'gsub'),
                        help='type of comparison to run (defaults to "area"), '
                        'if "gpos" is provided the input paths should point to '
                        'ttxn output')
    parser.add_argument('-m', '--match',
                        help='if provided, compares all matching files found '
                        'in PATH_A with respective matches in PATH_B')
    parser.add_argument('-l', '--out-lines', type=int, default=20,
                        help='number of differences to print (default 20)')
    parser.add_argument('-w', '--whitelist', nargs='+',
                        help='list of one or more glyph names to ignore')
    parser.add_argument('--render-path', help='if provided and DIFF_TYPE is '
                        '"rendered", saves comparison renderings here')
    parser.add_argument('--gpos-bound', type=int, default=3,
                        help='error bound to allow for gpos differences, '
                        'anything below is not printed (default 3)')
    args = parser.parse_args()

    if ['area', 'rendered'] in args.diff_type:
        stats = []
        if args.match:
            _run_multiple(_shape, args.match, args.path_a, args.path_b, stats,
                          args.diff_type, args.render_path)
        else:
            _shape(args.path_a, args.path_b, stats, args.diff_type,
                   args.render_path)
        _dump_shape_stats(stats, args.whitelist, args.out_lines, args.diff_type,
                          multiple_fonts=bool(args.match))

    elif args.diff_type == 'gpos':
        if args.match:
            _run_multiple(_gpos, args.match, args.path_a, args.path_b,
                          args.gpos_bound, args.out_lines, True)
        else:
            _gpos(args.path_a, args.path_b, args.gpos_bound, args.out_lines)

    elif args.diff_type == 'gsub':
        if args.match:
            _run_multiple(_gsub, args.match, args.path_a, args.path_b,
                          args.out_lines, True)
        else:
            _gsub(args.path_a, args.path_b, args.out_lines)

    else:
        assert 0, 'Got unhandled diff type "%s"' % args.diff_type
dataset/ETHPy150Open googlei18n/nototools/nototools/fontdiff.py/main/swapped operands of `in`