rename all the refrences to this objname
773397
def rename(idf, objkey, objname, newname):
    """"""
    refnames = getrefnames(idf, objkey)
    for refname in refnames:
        objlists = getallobjlists(idf, refname)
        # [('OBJKEY', refname, fieldindexlist), ...]
        for refname in refnames:
        # TODO : there seems to be a duplication in this loop. Check.
        # refname appears in both loops
            for robjkey, refname, fieldindexlist in objlists:
                idfobjects = idf.idfobjects[robjkey]
                for idfobject in idfobjects:
                    for findex in fieldindexlist:  # for each field
                        if idfobject[idfobject.objls[findex]] == objname:
                            idfobject[idfobject.objls[findex]] = newname
    theobject = idf.getobject(objkey, objname)
    fieldname = [item for item in theobject.objls if item.endswith('Name')][0]
    theobject[fieldname] = newname
    return theobject
454082
function renameKeys(rules) {
  var result = {};
  Object.keys(rules).forEach(function (k) {
    result[k.match(/[^-]+$/)] = rules[k];
  });
  return result;
}
1107817
def renamecol(self, old, new):
        
        spreadsheet.renamecol(self,old,new)
        for x in self.coloring.keys():
            if old in self.coloring[x]:
                ind = self.coloring[x].index(old)
                self.coloring[x][ind] = new
1066599
def record_rename(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/rename' % object_id, input_params, always_retry=always_retry, **kwargs)
466110
function renameFunction(func, newName) {
    // eslint-disable-next-line no-unused-vars
    const prop = Object.getOwnPropertyDescriptor(func, 'name');
    if (prop) {
        const { value, ...others } = prop;
        Object.defineProperty(func, 'name', { value: newName, ...others });
    }
}
172492
function ref_copy_self(self, obj) {
	//console.log( 'at ref_copy_self(): self = ' + JSON.stringify(self) + ', obj = ' + JSON.stringify(obj) );
	ARRAY(Object.keys(obj)).forEach(function(key) {
		self[key] = ref_copy(obj[key]);
	});
}
905086
def _full_rename(args):
    
    return (
        args.ns and
        all(map(args.rename.affects, args.ns))
    )
563775
def rename(self, bucket, key, key_to, force='false'):
        
        return self.move(bucket, key, bucket, key_to, force)
419634
def _rename_coords(ds, attrs):
    """"""
    for name_int, names_ext in attrs.items():
        # Check if coord is in dataset already.
        ds_coord_name = set(names_ext).intersection(set(ds.coords))
        if ds_coord_name:
            # Rename to the aospy internal name.
            try:
                ds = ds.rename({list(ds_coord_name)[0]: name_int})
                logging.debug("Rename coord from `{0}` to `{1}` for "
                              "Dataset `{2}`".format(ds_coord_name,
                                                     name_int, ds))
            # xarray throws a ValueError if the name already exists
            except ValueError:
                ds = ds
    return ds
2838
def rewrite_refs( targets, old,new, index, key='refs', single_ref=False ):
    """"""
    for parent in targets:
        if not isinstance( parent, dict ):
            try:
                parent = index[parent]
            except KeyError, err:
                continue 
        rewrite_references( parent[key], old, new, single_ref=single_ref )
1106002
function renameKey(fp, opts) {
  if (opts && opts.renameKey) {
    return opts.renameKey(fp, opts);
  }
  return basename(fp);
}
949905
def renames(self, new):
        
        os.renames(self, new)
        return self._next_class(new)
1016568
def database_rename(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/rename' % object_id, input_params, always_retry=always_retry, **kwargs)
845046
function renameValue(item, rawName) {
  var trimmedName = rawName.trim();
  if (item.cleanFootnotes) {
    var length = trimmedName.length;
    if (
      trimmedName.indexOf("(") === length - 3 &&
      trimmedName.indexOf(")") === length - 1
    ) {
      return trimmedName.slice(0, length - 3);
    }
  }
  return trimmedName;
}
343186
def rename(self, name):
        """"""
        if name:
            # defug callback add?
            rename1, rename2 = callbacks.add(
                b'rename', self.change_name, False)
            self.dispatch_command(b'/bin/echo "' + rename1 + b'""' + rename2 +
                                  b'"' + name + b'\n')
        else:
            self.change_name(self.hostname.encode())
1064416
def renamed(self, source, dest):
        """"""
        filename = osp.abspath(to_text_string(source))
        index = self.editorstacks[0].has_filename(filename)
        if index is not None:
            for editorstack in self.editorstacks:
                editorstack.rename_in_data(filename,
                                           new_filename=to_text_string(dest))
346642
function rename(object, fromKey, toKey) {
  if ((0, _has2.default)(object, fromKey)) {
    object[toKey] = object[fromKey];
    delete object[fromKey];
  }
}