Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/jedi/api/exceptions.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-04-20 06:09 +0000

1class _JediError(Exception): 

2 pass 

3 

4 

5class InternalError(_JediError): 

6 """ 

7 This error might happen a subprocess is crashing. The reason for this is 

8 usually broken C code in third party libraries. This is not a very common 

9 thing and it is safe to use Jedi again. However using the same calls might 

10 result in the same error again. 

11 """ 

12 

13 

14class WrongVersion(_JediError): 

15 """ 

16 This error is reserved for the future, shouldn't really be happening at the 

17 moment. 

18 """ 

19 

20 

21class RefactoringError(_JediError): 

22 """ 

23 Refactorings can fail for various reasons. So if you work with refactorings 

24 like :meth:`.Script.rename`, :meth:`.Script.inline`, 

25 :meth:`.Script.extract_variable` and :meth:`.Script.extract_function`, make 

26 sure to catch these. The descriptions in the errors are usually valuable 

27 for end users. 

28 

29 A typical ``RefactoringError`` would tell the user that inlining is not 

30 possible if no name is under the cursor. 

31 """