Remove an arg to the arg list
348573
def remove_arg(self, arg):
        """"""

        self.args = [arg_.strip() for arg_ in self.args if arg_.strip()]

        for arg_ in list(self.args):
            if arg_.lower() == arg.lower():
                self.args.remove(arg_)
927054
function filterArgs(args, exclude) {
    args = splitArgs(args || []);
    exclude = splitArgs(exclude || []);
    var clone = args.slice(0);
    return clone.filter(function (arg, i) {
        if (!~exclude.indexOf(arg))
            return true;
        var next = clone[i + 1];
        if (_flagExp.test(arg) && next && !_flagExp.test(next))
            clone.splice(i + 1, 1);
        return false;
    });
}
1160950
def remove(name):
    '''
    
    '''
    # Putting quotes around the parameter protects against command injection
    cmd = 'Uninstall-Module "{0}"'.format(name)
    no_ret = _pshell(cmd)
    return name not in list_modules()
489566
def __remove_args_first_item(self):
        
        if len(self.args) > 0:
            new_args_list = []
            for item in self.args:
                if len(item) > 0 and self.obj == item[0].__class__:
                    new_args_list.append(item[1:])
                else:
                    new_args_list.append(item[:])
            self.__set_args_list(new_args_list)
260370
def _transform_list_args(self, args):
        # type: (dict) -> None
        

        if '_limit' in args:
            args['limit'] = int(args['_limit'])
            del args['_limit']

        if '_page' in args:
            page = int(args['_page'])
            if page < 0:
                page = 1

            args['page'] = page
            del args['_page']

            if 'limit' not in args:
                args['limit'] = 10

        if '_end' in args:
            end = int(args['_end'])
            args['limit'] = end - int(args.get('_start', 0))

        if '_start' in args:
            args['offset'] = args['_start']
            del args['_start']

        if '_sort' in args:
            args['order_by'] = args['_sort'].replace('__', '.')
            del args['_sort']

            if args.get('_order', 'ASC') == 'DESC':
                args['order_by'] = '-' + args['order_by']

        if '_order' in args:
            del args['_order']

        filter_by = self._create_filter_by()
        if filter_by:
            args['filter_by'] = filter_by
679266
def process_list_arg(arg):
    
    if isinstance(arg, list):
        return arg
    elif isinstance(arg, basestring):
        args = []
        for part in arg.split(","):
            args.append(part.strip())
        return args
303846
def args_without_command_name
      removed = []
      parts = command_name_from_args.split rescue []
      @args.dup.delete_if do |arg|
        removed << arg if parts.include?(arg) && !removed.include?(arg)
      end
    end
184198
def remove_extended_args(self, instructions):
        """"""
        new_instructions = []
        last_was_extarg = False
        n = len(instructions)
        for i, inst in enumerate(instructions):
            if (inst.opname == 'EXTENDED_ARG'
                and i+1 < n and instructions[i+1].opname != 'MAKE_FUNCTION'):
                last_was_extarg = True
                starts_line = inst.starts_line
                is_jump_target = inst.is_jump_target
                offset = inst.offset
                continue
            if last_was_extarg:

                # j = self.stmts.index(inst.offset)
                # self.lines[j] = offset

                new_inst = inst._replace(starts_line=starts_line,
                                        is_jump_target=is_jump_target,
                                        offset=offset)
                inst = new_inst
                if i < n:
                    new_prev = self.prev_op[instructions[i].offset]
                    j = instructions[i+1].offset
                    old_prev = self.prev_op[j]
                    while self.prev_op[j] == old_prev and j < n:
                        self.prev_op[j] = new_prev
                        j += 1

            last_was_extarg = False
            new_instructions.append(inst)
        return new_instructions
1015436
def consume_arguments(self, argument_list):
        
        if len(argument_list) == 0:
            return []
        if argument_list[0] == self.arg_name:
            argument_list = argument_list[1:]
            if self.constraint is bool:
                self.value = not self.value
            else:
                try:
                    value = argument_list.pop(0)
                except IndexError:
                    raise ParameterError('Argument %s expects a value' % self.arg_name)
                self.value = value
        return argument_list
23327
def p_arguments(p):
    
    if p[1] is None or p[3] is None:
        p[0] = None
    else:
        p[0] = make_arg_list(p[1], make_argument(p[3], p.lineno(2)))
860597
async def remove(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["remove"], *args, **kwargs)
439560
private List<String> removeSeLionArgumentsAndValues(List<String> args) {
        // assume all of the ProcessLauncherConfiguration and LauncherConfiguration arguments should not be forwarded
        Set<Field> fields = new HashSet<>();
        fields.addAll(Arrays.asList(ProcessLauncherConfiguration.class.getDeclaredFields()));
        fields.addAll(Arrays.asList(LauncherConfiguration.class.getDeclaredFields()));

        for (Field field : fields) {
            // we need jcommander parameter fields only
            Parameter parameter = field.getAnnotation(Parameter.class);
            if (parameter == null) {
                continue;
            }

            // get the "arity" (how many values it can have on the command line) of the parameter/argument.
            // for example "-foo bar bar2"  --> argument = -foo --> arity = 2 --> values = {bar, bar2}
            final Class<?> fieldType = field.getType();
            final int arity = (parameter.arity() != -1) ? parameter.arity() :
                (fieldType.equals(Integer.class) || fieldType.equals(Long.class) || fieldType.equals(String.class) ||
                    fieldType.equals(int.class) || fieldType.equals(long.class)) ? 1 : 0;

            if (arity > 0) {
                for (String arg : args) {
                    // when the arg we are processing is one of the @Parameter names
                    if (Arrays.asList(parameter.names()).contains(arg)) {
                        // replace each value with ""
                        for (int x = 1; x <= arity; x += 1 ) {
                            args.set(args.indexOf(arg) + x, "");
                        }
                        // replace the argument with ""
                        args.set(args.indexOf(arg), "");
                    }
                }
                // remove all ""
                args.removeAll(Arrays.asList(""));
            } else {
                // the "arity" of the argument 0. there are no values to worry about.
                // remove all instances of the argument (and/or one of its names) from args
                args.removeAll(Arrays.asList(parameter.names()));
            }
        }

        return args;
    }
486007
def remove_pos_arg_placeholders(alias_command):
    
    # Boundary index is the index at which named argument or positional argument starts
    split_command = shlex.split(alias_command)
    boundary_index = len(split_command)
    for i, subcommand in enumerate(split_command):
        if not re.match('^[a-z]', subcommand.lower()) or i > COLLISION_CHECK_LEVEL_DEPTH:
            boundary_index = i
            break

    return ' '.join(split_command[:boundary_index]).lower()
227626
def parse_args(args):
    
    index = None
    for arg_i, arg in enumerate(args):
        if not arg.startswith('-'):
            index = arg_i
            break

    # Unable to parse any arguments
    if index is None:
        return (args, None, [])

    return (args[:index], args[index], args[(index + 1):])
444174
def _remove(self, args):
        '''
        
        '''
        if len(args) < 2:
            raise SPMInvocationError('A package must be specified')

        packages = args[1:]
        msg = 'Removing packages:\n\t{0}'.format('\n\t'.join(packages))

        if not self.opts['assume_yes']:
            self.ui.confirm(msg)

        for package in packages:
            self.ui.status('... removing {0}'.format(package))

            if not self._pkgdb_fun('db_exists', self.opts['spm_db']):
                raise SPMDatabaseError('No database at {0}, cannot remove {1}'.format(self.opts['spm_db'], package))

            # Look at local repo index
            pkg_info = self._pkgdb_fun('info', package, self.db_conn)
            if pkg_info is None:
                raise SPMInvocationError('Package {0} not installed'.format(package))

            # Find files that have not changed and remove them
            files = self._pkgdb_fun('list_files', package, self.db_conn)
            dirs = []
            for filerow in files:
                if self._pkgfiles_fun('path_isdir', filerow[0]):
                    dirs.append(filerow[0])
                    continue
                file_hash = hashlib.sha1()
                digest = self._pkgfiles_fun('hash_file', filerow[0], file_hash, self.files_conn)
                if filerow[1] == digest:
                    self._verbose('Removing file {0}'.format(filerow[0]), log.trace)
                    self._pkgfiles_fun('remove_file', filerow[0], self.files_conn)
                else:
                    self._verbose('Not removing file {0}'.format(filerow[0]), log.trace)
                self._pkgdb_fun('unregister_file', filerow[0], package, self.db_conn)

            # Clean up directories
            for dir_ in sorted(dirs, reverse=True):
                self._pkgdb_fun('unregister_file', dir_, package, self.db_conn)
                try:
                    self._verbose('Removing directory {0}'.format(dir_), log.trace)
                    os.rmdir(dir_)
                except OSError:
                    # Leave directories in place that still have files in them
                    self._verbose('Cannot remove directory {0}, probably not empty'.format(dir_), log.trace)

            self._pkgdb_fun('unregister_pkg', package, self.db_conn)
81843
def remove(self, *args):
        

        key = self.get_storage_key(*args)
        pk = self.instance.pk.get()
        logger.debug("removing %s from index %s" % (pk, key))
        self.connection.srem(key, pk)
        self._deindexed_values.add(tuple(args))
457975
def _replace_arg(arg, tvars, args):
    

    if tvars is None:
        tvars = []
    if hasattr(arg, '_subs_tree') and isinstance(arg, (GenericMeta, _TypingBase)):
        return arg._subs_tree(tvars, args)
    if isinstance(arg, TypeVar):
        for i, tvar in enumerate(tvars):
            if arg == tvar:
                return args[i]
    return arg