<commit_before># -*- coding: utf-8 -*-
"""
@author: <NAME> <<EMAIL>>
"""


class TempyException(Exception):
    """Base TemPy exception class"""


class TagError(TempyException):
    """Base Tag Exception"""
    def __init__(self, tag, *args):
        super().__init__(*args)
        self.tag = tag


class ContentError(object):
    """Raised when dealing with Content or DOMElement.content_data"""
    def __init__(self, tag, content, *args):
        super().__init__(tag, content, *args)
        self.content = content


class WrongContentError(ContentError, ValueError):
    """Raised when the provided content is not a dict."""<commit_msg>Widget Exceptions<commit_after># -*- coding: utf-8 -*-
"""
@author: <NAME> <<EMAIL>>
"""


class TempyException(Exception):
    """Base TemPy exception class"""


class TagError(TempyException):
    """Base Tag Exception"""
    def __init__(self, tag, *args):
        super().__init__(*args)
        self.tag = tag


class ContentError(object):
    """Raised when dealing with Content or DOMElement.content_data"""
    def __init__(self, tag, content, *args):
        super().__init__(tag, content, *args)
        self.content = content


class WrongContentError(ContentError, ValueError):
    """Raised when the provided content is not a dict."""


class WidgetError(TempyException):
    """Base widget error"""
    def __init__(self, widget, *args):
        super().__init__(*args)
        self.widget = widget


class WidgetDataError(WidgetError):
    """Raised when wrong data is given to a widget"""
{'fraction_non_alphanumeric': 0.14479638009049775, 'fraction_numerical': 0.001292824822236587, 'mean_word_length': 3.690909090909091, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5789713', 'n_tokens_mistral': 462, 'n_tokens_neox': 443, 'n_words': 133}