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

Method consume_argument

cmd2/argparse_completer.py:256–259  ·  view source on GitHub ↗

Consume token as an argument.

(arg_state: _ArgumentState, arg_token: str)

Source from the content-addressed store, hash-verified

254 completed_mutex_groups: dict[argparse._MutuallyExclusiveGroup, argparse.Action] = {}
255
256 def consume_argument(arg_state: _ArgumentState, arg_token: str) -> None:
257 """Consume token as an argument."""
258 arg_state.count += 1
259 consumed_arg_values.setdefault(arg_state.action.dest, []).append(arg_token)
260
261 #############################################################################################
262 # Parse all but the last token

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected