Remove a given list of excluded modules from a module list
@this - The active plugin instance
551377
function removeExcludedModules(modules, packageForceExcludes, log) {
  const excludedModules = _.remove(modules, externalModule => {   // eslint-disable-line lodash/prefer-immutable-method
    const splitModule = _.split(externalModule, '@');
    // If we have a scoped module we have to re-add the @
    if (_.startsWith(externalModule, '@')) {
      splitModule.splice(0, 1);
      splitModule[0] = '@' + splitModule[0];
    }
    const moduleName = _.first(splitModule);
    return _.includes(packageForceExcludes, moduleName);
  });

  if (log && !_.isEmpty(excludedModules)) {
    this.serverless.cli.log(`Excluding external modules: ${_.join(excludedModules, ', ')}`);
  }
}
662322
public function remove(Module $removedModule) : array
    {
        $allModules = $this->storage->read();

        foreach ($allModules as $key => $module) {
            if ($removedModule->equals($module)) {
                unset($allModules[$key]);
            }
        }

        $this->storage->write($allModules);

        return $allModules;
    }
941185
function removeFromList(i, L, R) {
    R[L[i]] = R[i];
    L[R[i]] = L[i];
    R[i] = i;
    L[i] = i;
}
936544
function removeFromList(imageIdIndex) {
    const index = stackPrefetch.indicesToRequest.indexOf(imageIdIndex);

    if (index > -1) {
      // Don't remove last element if imageIdIndex not found
      stackPrefetch.indicesToRequest.splice(index, 1);
    }
  }
632300
def remove_excluded(self):
        
        # import yaml
        # print yaml.dump({k:v.__json__() for k,v in self.sources.items()}, default_flow_style=False)
        sources = list(self.sources.values())
        for src in sources:
            if src.excluded:
                del self.sources[src.name]
            src.imports = [m for m in src.imports if not self._exclude(m)]
            src.imported_by = [m for m in src.imported_by if not self._exclude(m)]
409532
function ignorePlugins(plugins, currentPlugin) {
  return plugins.reduce(function (acc, plugin) {
    if (currentPlugin && currentPlugin.indexOf(plugin) > -1) {
      return true;
    }

    return acc;
  }, false);
}
170004
private void removeVetoedClasses(Set<Class<?>> classes) {
        //get hold of classnames
        Set<String> classNames = new HashSet<String>();
        for (Class<?> clazz : classes) {
            classNames.add(clazz.getName());
        }
        // take into considerations of the exclude in beans.xml
        Collection<String> includedClasses = WeldCDIUtils.filterClassesBasedOnBeansXML(this.beansXml, this.resourceLoader, classNames);
        Iterator<Class<?>> iterator = classes.iterator();
        while (iterator.hasNext()) {
            Class<?> clazz = iterator.next();
            if (WeldCDIUtils.isClassVetoed(clazz)) {
                iterator.remove();
            } else if (!includedClasses.contains(clazz.getName())) {
                iterator.remove();
            }

        }
    }
316231
def _remove_persistent_module(mod, comment):
    '''
    
    '''
    conf = _get_modules_conf()
    mod_name = _strip_module_name(mod)
    if not mod_name or mod_name not in mod_list(True):
        return set()
    escape_mod = re.escape(mod)
    if comment:
        __salt__['file.comment'](conf, '^[\t ]*{0}[\t ]?'.format(escape_mod))
    else:
        __salt__['file.sed'](conf, '^[\t ]*{0}[\t ]?'.format(escape_mod), '')
    return set([mod_name])
344159
public function uninstall()
    {
        $_POST['selected'] = [];

        foreach ((array) $this->plugin as $plugin) {
            $_POST['selected'][] = $plugin->name;
        }

        $_POST['edit_method'] = 'delete';
        ob_start();
        plugin_multi_edit();
        ob_end_clean();
    }
328139
function RemovePlugin (ext_module_id) {
  let copy = plugins[ext_module_id]

  let runPreWorkflowFunctions = function () {
    if (!plugins[ext_module_id].PreRemovePlugin) throw new Error('Error: PreRemovePlugin function must be implemented.')
    plugins[ext_module_id].PreRemovePlugin()
  }

  let runPostWorkflowFunctions = function () {
    if (!copy.PostRemovePlugin) throw new Error('Error: PostRemovePlugin function must be implemented.')
    copy.PostRemovePlugin(module.exports)
  }

  runPreWorkflowFunctions()
  delete plugins[ext_module_id]
  log.info('Removed Plugin', ext_module_id)
  runPostWorkflowFunctions()

  return true
}
1139654
public Collection<Plugin> removeUncheckedPlugins( Collection<String> uncheckedPlugins, Collection<Plugin> plugins )
        throws MojoExecutionException
    {
        if ( uncheckedPlugins != null && !uncheckedPlugins.isEmpty() )
        {
            for ( String pluginKey : uncheckedPlugins )
            {
                Plugin plugin = parsePluginString( pluginKey, "UncheckedPlugins" );
                plugins.remove( plugin );
            }
        }
        return plugins;
    }
954066
def collect_plugins(self, modules=None):
        
        if modules is None:
            modules = self.get_loaded_modules()
        else:
            modules = util.return_list(modules)

        plugins = []
        for module in modules:
            module_plugins = [(item[1], item[0])
                              for item
                              in inspect.getmembers(module)
                              if item[1] and item[0] != '__builtins__']
            module_plugins, names = zip(*module_plugins)

            module_plugins = self._filter_modules(module_plugins, names)
            plugins.extend(module_plugins)
        return plugins
934830
def remove_plugin_filepaths(self, filepaths):
        
        filepaths = util.to_absolute_paths(filepaths)
        self.plugin_filepaths = util.remove_from_set(self.plugin_filepaths,
                                                     filepaths)
131028
def purgeDeletedWidgets():
        """"""
        toremove = []
        for field in AbstractEditorWidget.funit_fields:
            if sip.isdeleted(field):
                toremove.append(field)
        for field in toremove:
            AbstractEditorWidget.funit_fields.remove(field)

        toremove = []
        for field in AbstractEditorWidget.tunit_fields:
            if sip.isdeleted(field):
                toremove.append(field)
        for field in toremove:
            AbstractEditorWidget.tunit_fields.remove(field)
561198
function removeVendorHelper() {
  if (this.options.zip && this.options.cleanupZipHelper) {
    if (this.serverless.service.package.individually) {
      return BbPromise.resolve(this.targetFuncs)
        .map(f => {
          if (!get(f, 'module')) {
            set(f, ['module'], '.');
          }
          return f;
        })
        .then(funcs => uniqBy(funcs, f => f.module))
        .map(f => {
          this.serverless.cli.log(
            `Removing Python requirements helper from ${f.module}...`
          );
          return fse.removeAsync(
            path.join(this.servicePath, f.module, 'unzip_requirements.py')
          );
        });
    } else {
      this.serverless.cli.log('Removing Python requirements helper...');
      return fse.removeAsync(
        path.join(this.servicePath, 'unzip_requirements.py')
      );
    }
  }
}
61836
def remove_all_attributes(element, exclude=None):
    
    if exclude is None:
        exclude = []
    for k in element.attrib.keys():
        if k not in exclude:
            element.attrib.pop(k)
922898
public function validateExcludedModules(array $excluded_modules) {
    $components = $this->componentDiscovery->getAll();

    // Can't exclude Lightning Core.
    unset($components['lightning_core']);

    // Can't exclude anything that isn't a Lightning component or sub-component.
    $invalid = array_diff($excluded_modules, array_keys($components));

    if ($invalid) {
      $error = sprintf(
        $this->trans('commands.lightning.subprofile.errors.invalid-exclusions'),
        Element::oxford($invalid)
      );

      throw new \InvalidArgumentException($error);
    }
  }