Renames a channel.

        Args:
            channel (str): The channel id. e.g. 'C1234567890'
            name (str): The new channel name. e.g. 'newchannel'
434701
def channels_rename(self, *, channel: str, name: str, **kwargs) -> SlackResponse:
        
        self._validate_xoxp_token()
        kwargs.update({"channel": channel, "name": name})
        return self.api_call("channels.rename", json=kwargs)
197347
def bring_to_front(self, channel):
        
        channel_index = wt_kit.get_index(self.channel_names, channel)
        new = list(self.channel_names)
        new.insert(0, new.pop(channel_index))
        self.channel_names = new
835772
def _next_channel_id(self):
        ''''''
        self._channel_counter += 1
        if self._channel_counter >= self._channel_max:
            self._channel_counter = 1
        return self._channel_counter
1226347
def get_channel(self, name):
        
        r = self.kraken_request('GET', 'channels/' + name)
        return models.Channel.wrap_get_channel(r)
493725
def rename_pipe(self, old_name, new_name):
        
        if old_name not in self.pipe_names:
            raise ValueError(Errors.E001.format(name=old_name, opts=self.pipe_names))
        if new_name in self.pipe_names:
            raise ValueError(Errors.E007.format(name=new_name, opts=self.pipe_names))
        i = self.pipe_names.index(old_name)
        self.pipeline[i] = (new_name, self.pipeline[i][1])
461019
def rename(name, new_name):
    '''
    
    '''
    current_info = info(name)
    if not current_info:
        raise CommandExecutionError('User \'{0}\' does not exist'.format(name))
    new_info = info(new_name)
    if new_info:
        raise CommandExecutionError(
            'User \'{0}\' already exists'.format(new_name)
        )
    _dscl(
        ['/Users/{0}'.format(name), 'RecordName', name, new_name],
        ctype='change'
    )
    # dscl buffers changes, sleep 1 second before checking if new value
    # matches desired value
    time.sleep(1)
    return info(new_name).get('RecordName') == new_name
106454
def get_output_channel(self, output_channel_name):
        
        if not output_channel_name in self.output_channels.keys():
            self.output_channels[output_channel_name] = Channel()
        self.output_channels[output_channel_name].add_producer(self)
        return self.output_channels[output_channel_name]
706518
def rename(self, new_name):
        

        yield from self._hypervisor.send("nio rename {name} {new_name}".format(name=self._name, new_name=new_name))

        log.info("NIO {name} renamed to {new_name}".format(name=self._name, new_name=new_name))
        self._name = new_name
637415
def open_channel(self):
        
        _logger.info('Creating a new channel')
        self._connection.channel(on_open_callback=self.on_channel_open)
711842
def rename(self, name):
        
        self.update(name='{} node {}'.format(name, self.nodeid))
483495
def rename(self, new):
        
        os.rename(self, new)
        return self._next_class(new)
302859
def rename_experiment(self, new_name):
        '''
        '''
        logger.info('rename experiment "%s"', self.experiment_name)
        content = {'name': new_name}
        url = self._build_api_url(
            '/experiments/{experiment_id}'.format(
                experiment_id=self._experiment_id
            )
        )
        res = self._session.put(url, json=content)
        res.raise_for_status()
        self.experiment_name = new_name
1374711
def rename(self, new_name, *args, **kwargs):
        
        new = self.reddit_session.rename_multireddit(self.name, new_name,
                                                     *args, **kwargs)
        self.__dict__ = new.__dict__  # pylint: disable=W0201
        return self
263565
def rename(self, name, **kwargs):
        

        return self._rename(self._dxid, {"project": self._proj,
                                         "name": name}, **kwargs)
1292256
def rename(self, new_name):
    
    update = copy.copy(self)
    update.name = new_name
    return self._do_update(update)
195854
def rename(self, name):
        
        return self.client.api.rename(self.id, name)
774522
def edit_channel_info(self, new_ch_name, ch_dct):
        
        self.ch_name = new_ch_name
        self.dct = ch_dct
        if ch_dct['type'] == 'analog':
            fmter = fmt.green
        else:
            fmter = fmt.blue
        self.ch_name_label.setText(fmt.b(fmter(self.ch_name)))
        self.generateToolTip()