Delete artifact properties
341472
def del_properties(self, pathobj, props, recursive):
        
        if isinstance(props, str):
            props = (props,)

        url = '/'.join([pathobj.drive,
                        'api/storage',
                        str(pathobj.relative_to(pathobj.drive)).strip('/')])

        params = {'properties': ','.join(sorted(props))}

        if not recursive:
            params['recursive'] = '0'

        text, code = self.rest_del(url,
                                   params=params,
                                   auth=pathobj.auth,
                                   verify=pathobj.verify,
                                   cert=pathobj.cert)

        if code == 404 and "Unable to find item" in text:
            raise OSError(2, "No such file or directory: '%s'" % url)
        if code != 204:
            raise RuntimeError(text)
802968
protected function cleanUpProjectTemplate() {
    // Remove files leftover from acquia/blt-project.
    $result = $this->taskFilesystemStack()
      ->remove($this->getConfigValue('repo.root') . '/.travis.yml')
      ->remove($this->getConfigValue('repo.root') . '/LICENSE.txt')
      ->remove($this->getConfigValue('repo.root') . '/README.md')
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
      ->run();

    if (!$result->wasSuccessful()) {
      throw new BltException("Could not remove deprecated files provided by acquia/blt-project.");
    }
  }
521692
def cleanup(arctic_lib, symbol, version_ids, versions_coll, shas_to_delete=None, pointers_cfgs=None):
    
    pointers_cfgs = set(pointers_cfgs) if pointers_cfgs else set()
    collection = arctic_lib.get_top_level_collection()
    version_ids = list(version_ids)

    # Iterate versions to check if they are created only with fw pointers, parent pointers (old), or mixed
    # Keep in mind that the version is not yet inserted.
    all_symbol_pointers_cfgs = _get_symbol_pointer_cfgs(symbol, versions_coll)
    all_symbol_pointers_cfgs.update(pointers_cfgs)

    # All the versions of the symbol have been created with old arctic or with disabled forward pointers.
    # Preserves backwards compatibility and regression for old pointers implementation.
    if all_symbol_pointers_cfgs == {FwPointersCfg.DISABLED} or not all_symbol_pointers_cfgs:
        _cleanup_parent_pointers(collection, symbol, version_ids)
        return

    # All the versions of the symbol we wish to delete have been created with forward pointers
    if FwPointersCfg.DISABLED not in all_symbol_pointers_cfgs:
        _cleanup_fw_pointers(collection, symbol, version_ids, versions_coll,
                             shas_to_delete=shas_to_delete, do_clean=True)
        return

    # Reaching here means the symbol has versions with mixed forward pointers and legacy/parent pointer configurations
    _cleanup_mixed(symbol, collection, version_ids, versions_coll)
1178295
function removeStyleProperties(styles, properties) {
  _(styles).each(function(value, key) {
    if(_(properties).include(key)) {
      delete styles[key]
    }
  });
  return styles;
}
1011650
def remove_properties(self):
        
        node_prop = self.node.find('properties')
        if node_prop is not None:
            self.node.remove(node_prop)
787335
def removeItem(self, item):
        """"""
        try:
            self.tree.removeItem(item)
        except AttributeError, e:
            raise VersionError('Saved versions are immutable')
979604
def remove_property(self, prop):
        """"""
        self._properties.remove(prop)
        self._pairs.difference_update((o, prop) for o in self._objects)
942689
protected function removePresets()
    {
        $files = new Filesystem;
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_tachyons.scss");
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_bootstrap.scss");
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_bulma.scss");
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_foundation.scss");
        $files->delete("{$this->sageRoot}/resources/assets/scripts/autoload/_bootstrap.js");
        $files->delete("{$this->sageRoot}/resources/assets/scripts/autoload/_foundation.js");
        $files->delete("{$this->sageRoot}/resources/assets/build/webpack.config.preset.js");
        $files->delete("{$this->sageRoot}/resources/assets/styles/tailwind.config.js");
    }
157005
private void clean(ArtifactoryCollector collector, List<ArtifactoryRepo> existingRepos) {
        // find the server url's to collect from
        Set<String> serversToBeCollected = new HashSet<>();
        serversToBeCollected.addAll(collector.getArtifactoryServers());

        // find the repos to collect from each server url above
        List<Set<String>> repoNamesToBeCollected = new ArrayList<Set<String>>();
        List<String[]> allRepos = new ArrayList<>();
        artifactorySettings.getServers().forEach(serverSetting -> {
            allRepos.add((String[]) getRepoAndPatternsForServ(serverSetting.getRepoAndPatterns()).keySet().toArray());
        });
        for (int i = 0; i < allRepos.size(); i++) {
            Set<String> reposSet = new HashSet<>();
            if (allRepos.get(i) != null) {
                reposSet.addAll(Arrays.asList(allRepos.get(i)));
            }
            repoNamesToBeCollected.add(reposSet);
        }

        assert (serversToBeCollected.size() == repoNamesToBeCollected.size());

        List<ArtifactoryRepo> stateChangeRepoList = new ArrayList<>();
        for (ArtifactoryRepo repo : existingRepos) {
            if (isRepoEnabledAndNotCollected(collector, serversToBeCollected, repoNamesToBeCollected, repo) ||  // if it was enabled but not to be collected
                    isRepoDisabledAndToBeCollected(collector, serversToBeCollected, repoNamesToBeCollected, repo)) { // OR it was disabled and now is to be collected
                repo.setEnabled(isRepoCollected(collector, serversToBeCollected, repoNamesToBeCollected, repo));
                stateChangeRepoList.add(repo);
            }
        }
        if (!CollectionUtils.isEmpty(stateChangeRepoList)) {
            artifactoryRepoRepository.save(stateChangeRepoList);
        }
    }
1350362
def clean(self):
        """"""
        doc = self._resource
        result = {k: v for k, v in doc.iteritems() if k not in
                  self.internal_fields}

        if '_id' in doc and 'id' not in result:
            result['id'] = doc['_id']

        return result
50621
public function dirRemove()
    {
        $paths = $this->getPaths();
        $filesystem = $this->getFilesystem();
        $this->info('Removing artifact directories');
        $filesystem->remove([
            $paths['coverage'],
            $paths['reports']
        ]);
        $this->info('Artifact directories removed');
    }
319243
def clear(self):
        """"""

        for ax in self.flat_grid:
            for im_h in ax.findobj(AxesImage):
                im_h.remove()
200142
def _clear_dict(endpoint_props):
    '''
    
    '''
    return dict(
        (prop_name, prop_val)
        for prop_name, prop_val in six.iteritems(endpoint_props)
        if prop_val is not None
    )
605986
def delete(self):
        '''
        

        '''
        versions = self.get_versions()
        self.api.manager.delete_archive_record(self.archive_name)

        for version in versions:
            if self.authority.fs.exists(self.get_version_path(version)):
                self.authority.fs.remove(self.get_version_path(version))

            if self.api.cache:
                if self.api.cache.fs.exists(self.get_version_path(version)):
                    self.api.cache.fs.remove(self.get_version_path(version))

        if self.authority.fs.exists(self.archive_name):
            self.authority.fs.removedir(self.archive_name)

        if self.api.cache:
            if self.api.cache.fs.exists(self.archive_name):
                self.api.cache.fs.removedir(self.archive_name)
782936
def purge_items(app, env, docname):
    
    keys = list(env.traceability_all_items.keys())
    for key in keys:
        if env.traceability_all_items[key]['docname'] == docname:
            del env.traceability_all_items[key]
620280
function clearOwnProperties(obj) {
  for (var prop in obj) {
    if (obj.hasOwnProperty(prop)) {
      obj[prop] = undefined;
    }
  }
}
636386
def dropDataProducts(self, *pathnames):
        """"""
        trash = QTreeWidget(None)
        updated = False
        for path in pathnames:
            item = self.dpitems.get(path)
            if item and not item._dp.archived:
                self.takeTopLevelItem(self.indexOfTopLevelItem(item))
                trash.addTopLevelItem(item)
                del self.dpitems[path]
                updated = True
        if updated:
            self.emit(SIGNAL("updated"))