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

Method __init__

cmd2/argparse_completer.py:143–152  ·  view source on GitHub ↗

CompletionError which occurs when there are no results. If hinting is allowed on this argument, then its hint text will display. :param parser: Cmd2ArgumentParser instance which owns the action being completed :param arg_action: action being completed.

(self, parser: Cmd2ArgumentParser, arg_action: argparse.Action)

Source from the content-addressed store, hash-verified

141
142class _NoResultsError(CompletionError):
143 def __init__(self, parser: Cmd2ArgumentParser, arg_action: argparse.Action) -> None:
144 """CompletionError which occurs when there are no results.
145
146 If hinting is allowed on this argument, then its hint text will display.
147
148 :param parser: Cmd2ArgumentParser instance which owns the action being completed
149 :param arg_action: action being completed.
150 """
151 # Set apply_style to False because we don't want hints to look like errors
152 super().__init__(_build_hint(parser, arg_action), apply_style=False)
153
154
155class ArgparseCompleter:

Callers

nothing calls this directly

Calls 2

_build_hintFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected