<commit_before>class Channel(object):
    def __init__(self, server, channel):
        self.__server = server
        self.__channel = channel

    def __repr__(self):
        return '<%s: %s>' % (self.__class__.__name__, self.__channel.name)

    def delete(self):
        self.__server.remove_channel(self.__channel.id)

    def update(self, **kwargs):
        for key, value in kwargs.items():
            setattr(self.__channel, key, value)
        self.__server.set_channel_state(self.__channel)

    def allow(self, permissions):
        acls, groups, inherit = self.__server.get_acl(self.__channel.id)
        acls[0].allow = acls[0].allow = permissions
        self.__server.set_acl(self.__channel.id, acls, groups)

    def deny(self, permissions):
        acls, groups, inherit = self.__server.get_acl(self.__channel.id)
        acls[0].allow = acls[0].allow = permissions
        self.__server.set_acl(self.__channel.id, acls, groups)

    def serialize(self):
        return {
            'id': self.__channel.id,
            'parent': self.__channel.parent,
            'links': self.__channel.links,
            'name': self.__channel.name,
            'description': self.__channel.description,
            'temporary': self.__channel.temporary,
            'position': self.__channel.position,
        }<commit_msg>copy inherit<commit_after>class Channel(object):
    def __init__(self, server, channel):
        self.__server = server
        self.__channel = channel

    def __repr__(self):
        return '<%s: %s>' % (self.__class__.__name__, self.__channel.name)

    def delete(self):
        self.__server.remove_channel(self.__channel.id)

    def update(self, **kwargs):
        for key, value in kwargs.items():
            setattr(self.__channel, key, value)
        self.__server.set_channel_state(self.__channel)

    def allow(self, permissions):
        acls, groups, inherit = self.__server.get_acl(self.__channel.id)
        acls[0].allow = acls[0].allow = permissions
        self.__server.set_acl(self.__channel.id, acls, groups, inerit)

    def deny(self, permissions):
        acls, groups, inherit = self.__server.get_acl(self.__channel.id)
        acls[0].allow = acls[0].allow = permissions
        self.__server.set_acl(self.__channel.id, acls, groups, inherit)

    def serialize(self):
        return {
            'id': self.__channel.id,
            'parent': self.__channel.parent,
            'links': self.__channel.links,
            'name': self.__channel.name,
            'description': self.__channel.description,
            'temporary': self.__channel.temporary,
            'position': self.__channel.position,
        }
{'fraction_non_alphanumeric': 0.1262135922330097, 'fraction_numerical': 0.002987303958177745, 'mean_word_length': 2.5436507936507935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6297755', 'n_tokens_mistral': 780, 'n_tokens_neox': 768, 'n_words': 153}