<commit_before>import logging


class Error(Exception):

    level = logging.NOTSET

    http_code = NotImplemented

    message = NotImplemented

    code = NotImplemented

    def __init__(self, message=None, *, code=None, level=None, http_code=None):
        super().__init__(message)
        self.message = message or self.message
        self.code = code or self.code
        self.level = level or self.level
        self.http_code = http_code or self.http_code

    def __str__(self):
        return '[{code}] {message}'.format(message=self.message, code=self.code)

    def to_dict(self):
        dict(<commit_msg>fix Error.to_dict()<commit_after>import logging


class Error(Exception):

    level = logging.NOTSET

    http_code = NotImplemented

    message = NotImplemented

    code = NotImplemented

    def __init__(self, message=None, *, code=None, level=None, http_code=None):
        super().__init__(message)
        self.message = message or self.message
        self.code = code or self.code
        self.level = level or self.level
        self.http_code = http_code or self.http_code

    def __str__(self):
        return '[{code}] {message}'.format(message=self.message, code=self.code)

    def to_dict(self):
        return dict(
{'fraction_non_alphanumeric': 0.10438247011952191, 'fraction_numerical': 0.0, 'mean_word_length': 2.925, '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': '5471495', 'n_tokens_mistral': 384, 'n_tokens_neox': 366, 'n_words': 89}