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

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

8 statements  

1"""Commonly used exception classes.""" 

2 

3from .backend.execute import ExecutableNotFound, CalledProcessError 

4 

5__all__ = ['ExecutableNotFound', 'CalledProcessError', 

6 'RequiredArgumentError', 'FileExistsError', 

7 'UnknownSuffixWarning', 'FormatSuffixMismatchWarning', 

8 'DotSyntaxWarning'] 

9 

10 

11class RequiredArgumentError(TypeError): 

12 """:exc:`TypeError` raised if a required argument is missing.""" 

13 

14 

15class FileExistsError(FileExistsError): 

16 """:exc:`FileExistsError` raised with ``raise_if_exists=True``.""" 

17 

18 

19class UnknownSuffixWarning(RuntimeWarning): 

20 """:exc:`RuntimeWarning` raised if the suffix of ``outfile`` is unknown 

21 and the given ``format`` is used instead.""" 

22 

23 

24class FormatSuffixMismatchWarning(UserWarning): 

25 """:exc:`UserWarning` raised if the suffix ``outfile`` 

26 does not match the given ``format``.""" 

27 

28 

29class DotSyntaxWarning(RuntimeWarning): 

30 """:exc:`RuntimeWarning` raised if a quoted string 

31 is expected to cause a ``CalledProcessError`` from rendering."""