def run(self, cli_obj, name, args, line):
        args = args[1:]
        num_args = len(args)
        num_arg_types = len(self.argTypes)

        if num_args > num_arg_types:
            trailing_args = args[num_arg_types:]
            msg = 'trailing arguments: ' + tokenize.escape_args(trailing_args)
            raise CommandArgumentsError(msg)

        parsed_args = ParsedArgs()
        for n in range(num_args):
            arg_type = self.argTypes[n]
            value = arg_type.parse(cli_obj, args[n])
            setattr(parsed_args, arg_type.getName(), value)

        if num_arg_types < num_args:
            # Make sure the remaining options are optional
            # (The next argument must be marked as optional.
            # The optional flag on arguments after this doesn't matter.)
            arg_type = self.argTypes[num_args]
            if not arg_type.isOptional():
                msg = 'missing %s' % (arg_type.getHrName(),)
                raise CommandArgumentsError(msg)

        for n in range(num_args, num_arg_types):
            arg_type = self.argTypes[n]
            setattr(parsed_args, arg_type.getName(), arg_type.getDefaultValue())

        return self.runParsed(cli_obj, name, parsed_args)
dataset/ETHPy150Open facebookarchive/git-review/src/gitreview/cli/args.py/ArgCommand.run/swapped operands of `<`