<commit_before>import ast

__author__ = '<NAME>'
__email__ = '<EMAIL>'
__version__ = '2.1.0'


class ComprehensionChecker(object):
    """
    Flake8 plugin to help you write better list/set/dict comprehensions.
    """
    name = 'flake8-comprehensions'
    version = __version__

    def __init__(self, tree, *args, **kwargs):
        self.tree = tree

    messages = {
        'C400': 'C400 Unnecessary generator - rewrite as a list comprehension.',
        'C401': 'C401 Unnecessary generator - rewrite as a set comprehension.',
        'C402': 'C402 Unnecessary generator - rewrite as a dict comprehension.',
        'C403': 'C403 Unnecessary list comprehension - rewrite as a set comprehension.',
        'C404': 'C404 Unnecessary list comprehension - rewrite as a dict comprehension.',
        'C405': 'C405 Unnecessary {type} literal - ',
        'C406': 'C406 Unnecessary {type} literal - ',
        'C407': "C407 Unnecessary list comprehension - '{func}' can take a generator.",
        'C408': "C408 Unnecessary {type} call - rewrite as a literal.",
        'C409': 'C409 Unnecessary {type} passed to tuple() - ',
        'C410': 'C410 Unnecessary {type} passed to list() - ',
        'C411': 'C411 Unnecessary list call - remove the outer call to list().',
    }<commit_msg>Remove unnecessary base object (#147)<commit_after>import ast

__author__ = '<NAME>'
__email__ = '<EMAIL>'
__version__ = '2.1.0'


class ComprehensionChecker:
    """
    Flake8 plugin to help you write better list/set/dict comprehensions.
    """
    name = 'flake8-comprehensions'
    version = __version__

    def __init__(self, tree, *args, **kwargs):
        self.tree = tree

    messages = {
        'C400': 'C400 Unnecessary generator - rewrite as a list comprehension.',
        'C401': 'C401 Unnecessary generator - rewrite as a set comprehension.',
        'C402': 'C402 Unnecessary generator - rewrite as a dict comprehension.',
        'C403': 'C403 Unnecessary list comprehension - rewrite as a set comprehension.',
        'C404': 'C404 Unnecessary list comprehension - rewrite as a dict comprehension.',
        'C405': 'C405 Unnecessary {type} literal - ',
        'C406': 'C406 Unnecessary {type} literal - ',
        'C407': "C407 Unnecessary list comprehension - '{func}' can take a generator.",
        'C408': "C408 Unnecessary {type} call - rewrite as a literal.",
        'C409': 'C409 Unnecessary {type} passed to tuple() - ',
        'C410': 'C410 Unnecessary {type} passed to list() - ',
        'C411': 'C411 Unnecessary list call - remove the outer call to list().',
    }
{'fraction_non_alphanumeric': 0.12480680061823803, 'fraction_numerical': 0.0606646058732612, 'mean_word_length': 2.9406392694063928, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7426815', 'n_tokens_mistral': 866, 'n_tokens_neox': 728, 'n_words': 268}