Raised during completion operations to report any sort of error you want printed. Example use cases: - Reading a database to retrieve a completion data set failed - A previous command line argument that determines the data set being completed is invalid
| 25 | |
| 26 | |
| 27 | class CompletionError(Exception): |
| 28 | """Raised during completion operations to report any sort of error you want printed. |
| 29 | |
| 30 | Example use cases: |
| 31 | |
| 32 | - Reading a database to retrieve a completion data set failed |
| 33 | - A previous command line argument that determines the data set being completed is invalid |
| 34 | """ |
| 35 | |
| 36 | def __init__(self, *args: Any, apply_style: bool = True) -> None: |
| 37 | """Initialize CompletionError instance. |
| 38 | |
| 39 | :param apply_style: If True, then styles.ERROR will be applied to the message text when printed. |
| 40 | Set to False in cases where the message text already has the desired style. |
| 41 | Defaults to True. |
| 42 | """ |
| 43 | self.apply_style = apply_style |
| 44 | |
| 45 | super().__init__(*args) |
| 46 | |
| 47 | |
| 48 | class PassThroughException(Exception): # noqa: N818 |
no outgoing calls
searching dependent graphs…