Skip to content

Exceptions

docstring_format_checker.utils.exceptions 🔗

DocstringError 🔗

Bases: Exception

Exception raised when a docstring validation error occurs.

Source code in src/docstring_format_checker/utils/exceptions.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
class DocstringError(Exception):
    """
    Exception raised when a docstring validation error occurs.
    """

    def __init__(
        self,
        message: str,
        file_path: str,
        line_number: int,
        item_name: str,
        item_type: str,
    ) -> None:
        self.message = message
        self.file_path = file_path
        self.line_number = line_number
        self.item_name = item_name
        self.item_type = item_type
        super().__init__(f"Line {line_number}, {item_type} '{item_name}': {message}")
__init__ 🔗
__init__(
    message: str,
    file_path: str,
    line_number: int,
    item_name: str,
    item_type: str,
) -> None
Source code in src/docstring_format_checker/utils/exceptions.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
def __init__(
    self,
    message: str,
    file_path: str,
    line_number: int,
    item_name: str,
    item_type: str,
) -> None:
    self.message = message
    self.file_path = file_path
    self.line_number = line_number
    self.item_name = item_name
    self.item_type = item_type
    super().__init__(f"Line {line_number}, {item_type} '{item_name}': {message}")
message instance-attribute 🔗
message = message
file_path instance-attribute 🔗
file_path = file_path
line_number instance-attribute 🔗
line_number = line_number
item_name instance-attribute 🔗
item_name = item_name
item_type instance-attribute 🔗
item_type = item_type

InvalidConfigError 🔗

Bases: Exception

Source code in src/docstring_format_checker/utils/exceptions.py
22
23
class InvalidConfigError(Exception):
    pass

InvalidConfigError_DuplicateOrderValues 🔗

Bases: Exception

Source code in src/docstring_format_checker/utils/exceptions.py
26
27
class InvalidConfigError_DuplicateOrderValues(Exception):
    pass

InvalidTypeValuesError 🔗

Bases: Exception

Source code in src/docstring_format_checker/utils/exceptions.py
30
31
class InvalidTypeValuesError(Exception):
    pass

InvalidFileError 🔗

Bases: OSError

Source code in src/docstring_format_checker/utils/exceptions.py
34
35
class InvalidFileError(OSError):
    pass

DirectoryNotFoundError 🔗

Bases: OSError

Source code in src/docstring_format_checker/utils/exceptions.py
38
39
class DirectoryNotFoundError(OSError):
    pass