Coverage for C:\Repos\ekr-pylint\pylint\config\exceptions.py: 71%

7 statements  

« prev     ^ index     » next       coverage.py v6.4, created at 2022-05-24 10:21 -0500

1# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 

2# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE 

3# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt 

4 

5from __future__ import annotations 

6 

7 

8class UnrecognizedArgumentAction(Exception): 

9 """Raised if an ArgumentManager instance tries to add an argument for which the action 

10 is not recognized. 

11 """ 

12 

13 

14class _UnrecognizedOptionError(Exception): 

15 """Raised if an ArgumentManager instance tries to parse an option that is unknown.""" 

16 

17 def __init__(self, options: list[str], *args: object) -> None: 

18 self.options = options 

19 super().__init__(*args) 

20 

21 

22class ArgumentPreprocessingError(Exception): 

23 """Raised if an error occurs during argument pre-processing."""