Coverage for python/pyshacl_turbo/errors.py: 100.0%

14 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-16 12:25 +0000

1"""Public exception and warning contracts without a pySHACL dependency.""" 

2 

3 

4class ReportableRuntimeError(RuntimeError): 

5 def __init__(self, message): 

6 self.message = message 1cdefghijklbmnopqrstuvzABCDEwxFGy

7 

8 @property 

9 def args(self): 

10 return [self.message] 1b

11 

12 def __str__(self): 

13 return str(self.message) 1cdefghijklbmnopqrstuvwxy

14 

15 def __repr__(self): 

16 return f"ReportableRuntimeError: {self}" 1b

17 

18 

19class ValidationWarning(RuntimeWarning): 

20 pass 

21 

22 

23class ShapeRecursionWarning(ValidationWarning): 

24 pass