<commit_before>class EvidenceList:
    class Evidence:
        def __init__(self, name, desc, image, pos):
            self.name = name
            self.desc = desc
            self.image = image
            self.public = False
            self.pos = pos

        def set_name(self, name):
            self.name = name

        def set_desc(self, desc):
            self.desc = desc

        def set_image(self, image):
            self.image = image

        def to_string(self):
            sequence = (self.name, self.desc, self.image)
            return '&'.join(sequence)
            
    def __init__(self):
        self.evidences = []
        self.poses = {'def':['def', 'hld'], 'pro':['pro', 'hlp'], 'wit':['wit'], 'hlp':['hlp', 'pro'], 'hld':['hld', 'def'], 'jud':['jud'], 'all':['hlp', 'hld', 'wit', 'jud', 'pro', 'def', ''], 'pos':[]}
        
    def login(self, client):
        if client.area.evidence_mod == 'FFA':
            pass
        if client.area.evidence_mod == 'Mods':
            if not client.is_cm:
                return False
        if client.area.evidence_mod == 'CM':
            if not client.is_cm and not client.is_mod:
                return False
        if client.area.evidence_mod == 'HiddenCM':
            if not client.is_cm and not client.is_mod:
                return False
        return True

    def correct_format(self, client, desc):
        if client.area.evidence_mod != 'HiddenCM':
            return True
        else:
            #correct format: <owner = pos>\ndesc
            if desc[:9] == '<owner = ' and desc[9:12] in self.poses and desc[12:14] == '>\n':
                return True
            return False
            
        
    def add_evidence(self, client, name, description, image, pos = 'all'):
        if self.login(client):
            if client.area.evidence_mod == 'HiddenCM':
                pos = 'pos'
            self.evidences.append(self.Evidence(name, description, image, pos))
        
    def evidence_swap(self, client, id1, id2):
        if self.login(client):
            self.evidences[id1], self.evidences[id2] = self.evidences[id2], self.evidences[id1]
            
    def create_evi_list(self, client):
        evi_list = []
        nums_list = [0]
        for i in range(len(self.evidences)):
            if client.area.evidence_mod == 'HiddenCM' and self.login(client):<commit_msg>Limit evidence to 35 items<commit_after>class EvidenceList:
    limit = 35

    class Evidence:
        def __init__(self, name, desc, image, pos):
            self.name = name
            self.desc = desc
            self.image = image
            self.public = False
            self.pos = pos

        def set_name(self, name):
            self.name = name

        def set_desc(self, desc):
            self.desc = desc

        def set_image(self, image):
            self.image = image

        def to_string(self):
            sequence = (self.name, self.desc, self.image)
            return '&'.join(sequence)
            
    def __init__(self):
        self.evidences = []
        self.poses = {'def':['def', 'hld'], 'pro':['pro', 'hlp'], 'wit':['wit'], 'hlp':['hlp', 'pro'], 'hld':['hld', 'def'], 'jud':['jud'], 'all':['hlp', 'hld', 'wit', 'jud', 'pro', 'def', ''], 'pos':[]}
        
    def login(self, client):
        if client.area.evidence_mod == 'FFA':
            pass
        if client.area.evidence_mod == 'Mods':
            if not client.is_cm:
                return False
        if client.area.evidence_mod == 'CM':
            if not client.is_cm and not client.is_mod:
                return False
        if client.area.evidence_mod == 'HiddenCM':
            if not client.is_cm and not client.is_mod:
                return False
        return True

    def correct_format(self, client, desc):
        if client.area.evidence_mod != 'HiddenCM':
            return True
        else:
            #correct format: <owner = pos>\ndesc
            if desc[:9] == '<owner = ' and desc[9:12] in self.poses and desc[12:14] == '>\n':
                return True
            return False
            
        
    def add_evidence(self, client, name, description, image, pos = 'all'):
        if self.login(client):
            if client.area.evidence_mod == 'HiddenCM':
                pos = 'pos'
            if len(self.evidences) >= self.limit:
                client.send_host_message('You can\'t have more than {} evidence items at a time.'.format(self.limit))
            else:
                self.evidences.append(self.Evidence(name, description, image, pos))
        
    def evidence_swap(self, client, id1, id2):
        if self.login(client):
            self.evidences[id1], self.evidences[id2] = self.evidences[id2], self.evidences[id1]
            
    def create_evi_list(self, client):
        evi_list = []
        nums_list = [0]
        for i in range(len(self.evidences)):
            if client.area.evidence_mod == 'HiddenCM' and self.login(client):
{'fraction_non_alphanumeric': 0.13618990142828405, 'fraction_numerical': 0.00683967008650171, 'mean_word_length': 1.7995495495495495, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '7347320', 'n_tokens_mistral': 1540, 'n_tokens_neox': 1469, 'n_words': 371}