<commit_before>#!/usr/bin/python3

import sys

from pocketlint import FalsePositive, PocketLintConfig, PocketLinter


class BlivetLintConfig(PocketLintConfig):

    def __init__(self):
        PocketLintConfig.__init__(self)

        self.falsePositives = [FalsePositive(r"Catching an exception which doesn't inherit from (BaseException|Exception): (BlockDev|DM|Crypto|Swap|LVM|Btrfs|MDRaid|Utils|G)Error$"),
                               FalsePositive(r"Instance of 'int' has no .* member"),
                               FalsePositive(r"Method 'do_task' is abstract in class 'Task' but is not overridden"),
                               FalsePositive(r"Method 'do_task' is abstract in class 'UnimplementedTask' but is not overridden"),
                               FalsePositive(r"No value for argument 'member_count' in unbound method call$"),
                               FalsePositive(r"No value for argument 'smallest_member_size' in unbound method call$"),
                               FalsePositive(r"Parameters differ from overridden 'do_task' method$")
                               ]
<commit_msg>Ignore pylint error "bad-option-value" for new pylint errors<commit_after>#!/usr/bin/python3

import sys

from pocketlint import FalsePositive, PocketLintConfig, PocketLinter


class BlivetLintConfig(PocketLintConfig):

    def __init__(self):
        PocketLintConfig.__init__(self)

        self.falsePositives = [FalsePositive(r"Catching an exception which doesn't inherit from (BaseException|Exception): (BlockDev|DM|Crypto|Swap|LVM|Btrfs|MDRaid|Utils|G)Error$"),
                               FalsePositive(r"Instance of 'int' has no .* member"),
                               FalsePositive(r"Method 'do_task' is abstract in class 'Task' but is not overridden"),
                               FalsePositive(r"Method 'do_task' is abstract in class 'UnimplementedTask' but is not overridden"),
                               FalsePositive(r"No value for argument 'member_count' in unbound method call$"),
                               FalsePositive(r"No value for argument 'smallest_member_size' in unbound method call$"),
                               FalsePositive(r"Parameters differ from overridden 'do_task' method$"),
                               FalsePositive(r"Bad option value '(subprocess-popen-preexec-fn|try-except-raise)'")
                               ]

{'fraction_non_alphanumeric': 0.08635794743429287, 'fraction_numerical': 0.0008343763037129745, 'mean_word_length': 2.396600566572238, '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': '2819409', 'n_tokens_mistral': 660, 'n_tokens_neox': 622, 'n_words': 163}