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

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

13 statements  

1from typing import Final 

2 

3 

4class ParseError(Exception): 

5 path: Final[str] 

6 lineno: Final[int] 

7 msg: Final[str] 

8 

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

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

11 self.path = path 

12 self.lineno = lineno 

13 self.msg = msg 

14 

15 def __str__(self) -> str: 

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