<commit_before># -*- coding: utf-8 -*-
"""Exception Classes
"""


class BaseError(Exception):
    pass


class ChangeFileNameError(BaseError):
    def __init__(self, error_class, message):
        self.error_class = error_class
        self.message = message

    def __str__(self):
        return "{error_class}: {message}".format(error_class=self.error_class, message=self.message)


class MakePDFError(BaseError):
    def __init__(self, error_class, message):
        self.error_class = error_class
        self.message = message

    def __str__(self):
        return "{error_class}: {message}".format(error_class=self.error_class, message=self.message)


class MakeZIPError(BaseError):
    def __init__(self, error_class, message):
        self.error_class = error_class
        self.message = message

    def __str__(self):
        return "{error_class}: {message}".format(error_class=self.error_class, message=self.message)


class ZipFileExistError(MakeZIPError):
    def __init__(self):
        self.error_class = "ZipFileExistError"
        self.message = "Already Zipfile you decide name exist." \
                       "If overwrite, choose 'overwrite' parameter."


class InvalidDigitsFormat(ChangeFileNameError):
    def __init__(self):
        self.error_class = "ChangeFileNameError"
        self.message = "Invalid serial number digit value. " \
                       "If you want to use multiple digits, " \
                       "please divide into comma separator"


class InvalidExtensionType(ChangeFileNameError):
    def __init__(self):
        self.error_class = "InvalidExtensionType"
        self.message = "Invalid Extension Type. " \
                       "Expected string or bytes-like object"


class InvalidPathType(ChangeFileNameError):
    def __init__(self):
        self.error_class = "InvalidPathType"
        self.message = "Invalid Path string Type. " \
                       "Expected string, bytes-like, os.Path-like object"


class TargetSrcFileNotFoundError(ChangeFileNameError):
    def __init__(self):
        self.error_class = "TargetSrcFileNotFoundError"
        self.message = "Source directory you choose is no Target file."


class InvalidNumberParameterType(ChangeFileNameError):
    def __init__(self):
        self.error_class = "InvalidNumberParameterType"
        self.message = "To create new file name, must be used 'Integer'."


class InvalidImageParameterType(ChangeFileNameError):
    def __init__(self):
        self.error_class = "InvalidImageParameterType"
        self.message = "To check image file, must be 'Image file' such as jpeg, png, or gif."


class InvalidImageFileFormat(MakePDFError):
    def __init__(self):
        self.error_class = "InvalidImageFileFormat"
        self.message = "Not supported file format. Supported 'jpg', 'png', 'gif'"


class ChangeFileNameOSError(ChangeFileNameError):
    def __init__(self):
        self.error_class = "ChangeFileNameOSError"
        self.message = "OSError was occurred. Reading more message above."
<commit_msg>coverage test<commit_after># -*- coding: utf-8 -*-
"""Exception Classes
"""


class BaseError(Exception):
    pass


class ChangeFileNameError(BaseError):
    def __init__(self, error_class, message):
        self.error_class = error_class
        self.message = message

    def __str__(self):
        return "{error_class}: {message}".format(error_class=self.error_class, message=self.message)


class MakePDFError(BaseError):
    def __init__(self, error_class, message):
        self.error_class = error_class
        self.message = message

    def __str__(self):
        return "{error_class}: {message}".format(error_class=self.error_class, message=self.message)


class MakeZIPError(BaseError):
    def __init__(self, error_class, message):
        self.error_class = error_class
        self.message = message

    def __str__(self):
        return "{error_class}: {message}".format(error_class=self.error_class, message=self.message)


class ZipFileExistError(MakeZIPError):
    def __init__(self):
        super().__init__("ZipFileExistError", "Already Zipfile you decide name exist. "
                                              "If overwrite, choose 'overwrite' parameter.")


class InvalidDigitsFormat(ChangeFileNameError):
    def __init__(self):
        super().__init__("ChangeFileNameError", "Invalid serial number digit value. "
                                                "If you want to use multiple digits, "
                                                "please divide into comma separator")


class InvalidExtensionType(ChangeFileNameError):
    def __init__(self):
        super().__init__("InvalidExtensionType", "Invalid Extension Type. "
                                                 "Expected string or bytes-like object")


class InvalidPathType(ChangeFileNameError):
    def __init__(self):
        super().__init__("InvalidPathType", "Invalid Path string Type. "
                                            "Expected string, bytes-like, os.Path-like object")


class TargetSrcFileNotFoundError(ChangeFileNameError):
    def __init__(self):
        super().__init__("TargetSrcFileNotFoundError", "Source directory you choose is no Target file.")


class InvalidNumberParameterType(ChangeFileNameError):
    def __init__(self):
        super().__init__("InvalidNumberParameterType", "To create new file name, must be used 'Integer'.")


class InvalidImageParameterType(ChangeFileNameError):
    def __init__(self):
        super().__init__("InvalidImageParameterType", "To check image file, "
                                                      "must be 'Image file' such as jpeg, png, or gif.")


class InvalidImageFileFormat(MakePDFError):
    def __init__(self):
        super().__init__("InvalidImageFileFormat", "Not supported file format. "
                                                   "Supported 'jpg', 'png', 'gif'")


class ChangeFileNameOSError(ChangeFileNameError):
    def __init__(self):
        super().__init__("ChangeFileNameOSError", "OSError was occurred. Reading more message above.")

{'fraction_non_alphanumeric': 0.09768510917747496, 'fraction_numerical': 0.0003283533081595797, 'mean_word_length': 2.9076330981398333, '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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1754655', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1549, 'n_words': 403}