Adds a new argument to this expression.

    Args:
       argument (str): argument to add.

    Returns:
      True if the argument is the last argument, False otherwise.

    Raises:
      ParseError: If there are too many arguments.
421864
def AddArg(self, argument):
    
    self.args.append(argument)
    if len(self.args) > self.number_of_args:
      raise errors.ParseError('Too many arguments for this expression.')

    elif len(self.args) == self.number_of_args:
      return True

    return False
866253
def with_args(self, *args, **kwargs):
        

        self.args = args
        self.kwargs = kwargs
        self.verify_arguments()
        return self
401295
def add_custom_arg(self, custom_arg):
        
        if custom_arg.personalization is not None:
            try:
                personalization = \
                    self._personalizations[custom_arg.personalization]
                has_internal_personalization = True
            except IndexError:
                personalization = Personalization()
                has_internal_personalization = False
            if isinstance(custom_arg, dict):
                (k, v) = list(custom_arg.items())[0]
                personalization.add_custom_arg(CustomArg(k, v))
            else:
                personalization.add_custom_arg(custom_arg)

            if not has_internal_personalization:
                self.add_personalization(
                    personalization, index=custom_arg.personalization)
        else:
            if isinstance(custom_arg, dict):
                (k, v) = list(custom_arg.items())[0]
                self._custom_args = self._ensure_append(
                    CustomArg(k, v), self._custom_args)
            else:
                self._custom_args = self._ensure_append(
                    custom_arg, self._custom_args)
384706
def parse(self, arguments):
    
    new_values = self._parse(arguments)
    if self.present:
      self.value.extend(new_values)
    else:
      self.value = new_values
    self.present += len(new_values)
1203901
def add_arguments(self, parser):
        
        parser.add_argument(
            '--start', '-s',
            default=0,
            type=int,
            help=u"The Submission.id at which to begin updating rows. 0 by default."
        )
        parser.add_argument(
            '--chunk', '-c',
            default=1000,
            type=int,
            help=u"Batch size, how many rows to update in a given transaction. Default 1000.",
        )
        parser.add_argument(
            '--wait', '-w',
            default=2,
            type=int,
            help=u"Wait time between transactions, in seconds. Default 2.",
        )
40801
function addArg(args, name, val) {
  if (!val && val !== 0) {
    return;
  }
  var arg = name.length > 1 ? '--' + _.kebabCase(name) : '-' + name;
  // --max-old-space-size argument requires an `=`
  if (arg === '--max-old-space-size') {
    args.push(arg + '=' + val);
    return;
  } else {
    args.push(arg);
  }
  if (_.isString(val) || _.isNumber(val)) {
    args.push(val);
  }
}
26115
def _attach_arguments(self):
        """"""
        for arg in self.arguments:
            self.parser.add_argument(*arg[0], **arg[1])
1214290
def add_argument(self, name, value_type, item_help, default=None):
    
    if value_type and value_type not in self.__restricted_types:
      raise ArgumentException("Named argument couldn't have {} type".format(value_type.__name__))

    if default is not None and not isinstance(default, value_type):
      raise ArgumentException("Invalid default type for argument".format(name))

    if value_type is bool and default is None:
      default = False

    self._args.update({
      name: ModuleArgumentItem(name, value_type, item_help, default)
    })
    return self
84546
def add_arguments(self, parser):
        
        parser.add_argument('--length', default=self.length,
                            type=int, help=_('SECRET_KEY length default=%d' % self.length))

        parser.add_argument('--alphabet', default=self.allowed_chars,
                            type=str, help=_('alphabet to use default=%s' % self.allowed_chars))
1015555
def add_argument(self, parser, permissive=False, **override_kwargs):
        
        kwargs = {}
        required = None
        if self.kwargs:
            kwargs = copy.copy(self.kwargs)
            if 'env' in kwargs and 'help' in kwargs:
                kwargs['help'] = "%s (or set %s)" % (kwargs['help'],
                                                     kwargs['env'])
            if permissive:
                required = kwargs.pop('required', None)
            try:
                del kwargs['env']
            except KeyError:
                pass
            try:
                del kwargs['ini_section']
            except KeyError:
                pass

            # allow custom and/or exclusive argument groups
            if kwargs.get('group') or kwargs.get('mutually_exclusive'):
                groupname = kwargs.pop('group', None) or kwargs.get('dest')
                mutually_exclusive = kwargs.pop('mutually_exclusive', None)
                if not groupname:
                    raise NoGroupForOption(
                        "%s requires either 'group' or 'dest'." % self)
                description = kwargs.pop('group_description', None)
                exists = [grp for grp in parser._action_groups
                          if grp.title == groupname]
                if exists:
                    group = exists[0]
                    if description and not group.description:
                        group.description = description
                else:
                    group = parser.add_argument_group(
                        title=groupname, description=description)
                if mutually_exclusive:
                    if not required:
                        required = kwargs.pop('required', None)
                    mutexg_title = '%s mutually-exclusive-group' % groupname
                    exists = [grp for grp in group._mutually_exclusive_groups
                              if grp.title == mutexg_title]
                    if exists:
                        group = exists[0]
                    else:
                        # extend parent group
                        group = group.add_mutually_exclusive_group(
                            required=required)
                        group.title = mutexg_title
                    # if any in the same group are required, then the
                    # mutually exclusive group should be set to required
                    if required and not group.required:
                        group.required = required
                    self._mutexgroup = group
                self._action = group.add_argument(*self.args, **kwargs)
                return

        kwargs.update(override_kwargs)
        self._action = parser.add_argument(*self.args, **kwargs)
1220056
def append(self, *args):
        
        self.args.append(args)
        if self.started:
            self.started = False
        return self.length()
765956
private void add( final List<String> arguments,
                      final String argument )
    {
        if( argument != null && argument.trim().length() > 0 )
        {
            arguments.add( argument );
        }
    }
1101493
def _add_opt_argument(self, opt_args, arg_parser):
        
        option_args = opt_args.copy()

        groups = option_args.pop('groups', None)
        if groups:
            self._add_group(
                parser=arg_parser,
                groups=groups,
                option_args=option_args
            )

        exclusive_args = option_args.pop('mutually_exclusive', None)
        if exclusive_args:
            self._add_mutually_exclusive_group(
                parser=arg_parser,
                groups=exclusive_args,
                option_args=option_args
            )

        for k, v in option_args.items():
            self._add_arg(parser=arg_parser, value_dict=v)
766578
def add_command(self, command, *args, **kwargs):
        
        cmd = self.add_parser(command, *args, **kwargs)
1332067
def add_gnu_argument(self, *args, **kwargs):
    ""

    gnu_args = []

    for arg in args:
        # Fix if we have at least 3 chars where the first is a hyphen
        # and the second is not a hyphen (e.g. -op becomes --op)
        if len(arg) > 3 and arg[0] == '-' and arg[1] != '-':
            gnu_args.append('-' + arg)
        else:
            gnu_args.append(arg)

    argparse.ArgumentParser.add_argument(self, *gnu_args, **kwargs)
617983
def parse_args(self, arguments=None):
        
        self._args = self.parser.parse_args(arguments)
        return self.args
1040845
def p_arguments(self, p):
        
        if len(p) == 4:
            p[0] = self.asttypes.Arguments(p[2])
        else:
            p[0] = self.asttypes.Arguments([])
        p[0].setpos(p)