<commit_before># -*- coding: utf-8 -*-
from promises.models import Promise, Category, VerificationDocument, InformationSource
from popolo.models import Identifier


class PromiseCreator():
    def __init__(self,
                 category_qs=Category.objects.all(),
                 promise_qs=Promise.objects.all(),
                 verification_doc_qs = VerificationDocument.objects.all(),
                 information_source_qs = InformationSource.objects.all(),
                 **kwargs):
        self.category = None
        self.kwargs = kwargs
        self.category_qs = category_qs
        self.promise_qs = promise_qs
        self.verification_doc_qs = verification_doc_qs
        self.information_source_qs = information_source_qs
        self.warnings = []<commit_msg>Only allowing to define the querysets for promises and categories<commit_after># -*- coding: utf-8 -*-
from promises.models import Promise, Category, VerificationDocument, InformationSource
from popolo.models import Identifier


class PromiseCreator():
    def __init__(self,
                 category_qs=Category.objects.all(),
                 promise_qs=Promise.objects.all(),
                 **kwargs):
        self.category = None
        self.kwargs = kwargs
        self.category_qs = category_qs
        self.promise_qs = promise_qs
        self.verification_doc_qs = VerificationDocument.objects.filter(promise__in=self.promise_qs)
        self.information_source_qs = InformationSource.objects.filter(promise__in=self.promise_qs)
        self.warnings = []
{'fraction_non_alphanumeric': 0.08538163001293661, 'fraction_numerical': 0.00129366106080207, 'mean_word_length': 2.7916666666666665, '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': '3078454', 'n_tokens_mistral': 395, 'n_tokens_neox': 398, 'n_words': 81}