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

Class _UnfinishedFlagError

cmd2/argparse_completer.py:130–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129
130class _UnfinishedFlagError(CompletionError):
131 def __init__(self, flag_arg_state: _ArgumentState) -> None:
132 """CompletionError which occurs when the user has not finished the current flag.
133
134 :param flag_arg_state: information about the unfinished flag action.
135 """
136 arg = f"{argparse._get_action_name(flag_arg_state.action)}"
137 err = f"{build_range_error(flag_arg_state.min, flag_arg_state.max)}"
138 error = f"Error: argument {arg}: {err} ({flag_arg_state.count} entered)"
139 super().__init__(error)
140
141
142class _NoResultsError(CompletionError):

Callers 2

completeMethod · 0.85
_handle_last_tokenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…