Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/iniconfig/exceptions.py: 81%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

16 statements  

1from __future__ import annotations 

2from typing import TYPE_CHECKING 

3 

4if TYPE_CHECKING: 

5 from typing import Final 

6 

7 

8class ParseError(Exception): 

9 path: Final[str] 

10 lineno: Final[int] 

11 msg: Final[str] 

12 

13 def __init__(self, path: str, lineno: int, msg: str) -> None: 

14 super().__init__(path, lineno, msg) 

15 self.path = path 

16 self.lineno = lineno 

17 self.msg = msg 

18 

19 def __str__(self) -> str: 

20 return f"{self.path}:{self.lineno + 1}: {self.msg}"