MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / CompletionError

Class CompletionError

cmd2/exceptions.py:27–45  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

25
26
27class 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
48class PassThroughException(Exception): # noqa: N818

Callers 7

completer_raise_errorMethod · 0.90
complete_raise_errorMethod · 0.90
_update_mutex_groupsMethod · 0.85
complete_set_valueMethod · 0.85

Calls

no outgoing calls

Tested by 2

completer_raise_errorMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…