Coverage for src/docstring_format_checker/utils/exceptions.py: 100%

18 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-04 12:45 +0000

1class DocstringError(Exception): 

2 """ 

3 Exception raised when a docstring validation error occurs. 

4 """ 

5 

6 def __init__( 

7 self, 

8 message: str, 

9 file_path: str, 

10 line_number: int, 

11 item_name: str, 

12 item_type: str, 

13 ) -> None: 

14 self.message = message 

15 self.file_path = file_path 

16 self.line_number = line_number 

17 self.item_name = item_name 

18 self.item_type = item_type 

19 super().__init__(f"Line {line_number}, {item_type} '{item_name}': {message}") 

20 

21 

22class InvalidConfigError(Exception): 

23 pass 

24 

25 

26class InvalidConfigError_DuplicateOrderValues(Exception): 

27 pass 

28 

29 

30class InvalidTypeValuesError(Exception): 

31 pass 

32 

33 

34class InvalidFileError(OSError): 

35 pass 

36 

37 

38class DirectoryNotFoundError(OSError): 

39 pass