<commit_before>#coding: utf-8

from django import forms
import os

class PdfForm(forms.Form):
    pdf = forms.FileField(required=False)
    def __init__(self, *args, **kwargs):
        self.extensions = kwargs.pop('extensions', None)
        super(PdfForm, self).__init__(*args, **kwargs)
    def clean_pdf(self):
        file = self.cleaned_data.get('pdf')
        if file:
            name, extension = os.path.splitext(file.name)
            if extension not in self.extensions:
                raise forms.ValidationError(u'Файл должен иметь одно из расширений: ' + ",".join(self.extensions))


class QueueForm(forms.Form):
    rework = forms.BooleanField(initial=False, label='На доработке', required=False)
    verefication = forms.BooleanField(initial=True, label='На провеерке', required=False)
    mine = forms.BooleanField(initial=True, label='Мои задачи', required=False)
    following = forms.BooleanField(initial=True, label='Наблюдаемые мной', required=False)
    not_mine = forms.BooleanField(initial=True, label='Не мои', required=False)
    not_owned = forms.BooleanField(initial=True, label='Ничьи', required=False)
    overdue = forms.IntegerField(initial=0, label='Ждут проверки несколько дней')
<commit_msg>fix bug "на провеерке"<commit_after>#coding: utf-8

from django import forms
import os

class PdfForm(forms.Form):
    pdf = forms.FileField(required=False)
    def __init__(self, *args, **kwargs):
        self.extensions = kwargs.pop('extensions', None)
        super(PdfForm, self).__init__(*args, **kwargs)
    def clean_pdf(self):
        file = self.cleaned_data.get('pdf')
        if file:
            name, extension = os.path.splitext(file.name)
            if extension not in self.extensions:
                raise forms.ValidationError(u'Файл должен иметь одно из расширений: ' + ",".join(self.extensions))


class QueueForm(forms.Form):
    rework = forms.BooleanField(initial=False, label='На доработке', required=False)
    verefication = forms.BooleanField(initial=True, label='На проверке', required=False)
    mine = forms.BooleanField(initial=True, label='Мои задачи', required=False)
    following = forms.BooleanField(initial=True, label='Наблюдаемые мной', required=False)
    not_mine = forms.BooleanField(initial=True, label='Не мои', required=False)
    not_owned = forms.BooleanField(initial=True, label='Ничьи', required=False)
    overdue = forms.IntegerField(initial=0, label='Ждут проверки несколько дней')

{'fraction_non_alphanumeric': 0.12581168831168832, 'fraction_numerical': 0.0016233766233766235, 'mean_word_length': 4.24468085106383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7356865', 'n_tokens_mistral': 784, 'n_tokens_neox': 813, 'n_words': 165}