<commit_before># -*- coding: utf-8 -*-

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from gwv.validators import filters as default_filters
from gwv.validators import ValidatorClass

filters = {
    "alias": {True, False},
    "category": default_filters["category"]
}


class Validator(ValidatorClass):

    name = "donotuse"

    def is_invalid(self, name, related, kage, gdata, dump):
        quotings = []
        for line in kage.lines:
            if line.data[0] != 99:
                continue
            r = dump.get(line.data[7].split("@")[0])
            if r and "do-not-use" in r[1]:
                quotings.append(line.data[7])
        return quotings or False<commit_msg>Fix donotuse filter<commit_after># -*- coding: utf-8 -*-

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from gwv.validators import filters as default_filters
from gwv.validators import ValidatorClass

filters = {
    "alias": {False},
    "category": default_filters["category"]
}


class Validator(ValidatorClass):

    name = "donotuse"

    def is_invalid(self, name, related, kage, gdata, dump):
        quotings = []
        for line in kage.lines:
            if line.data[0] != 99:
                continue
            r = dump.get(line.data[7].split("@")[0])
            if r and "do-not-use" in r[1]:
                quotings.append(line.data[7])
        return quotings or False
{'fraction_non_alphanumeric': 0.10542929292929293, 'fraction_numerical': 0.010101010101010102, 'mean_word_length': 2.791866028708134, 'pattern_counts': {'":': 4, '<': 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': '2102623', 'n_tokens_mistral': 489, 'n_tokens_neox': 472, 'n_words': 136}