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

Method __init__

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

CompletionError which occurs when the user has not finished the current flag. :param flag_arg_state: information about the unfinished flag action.

(self, flag_arg_state: _ArgumentState)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls 2

build_range_errorFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected