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

Method find_commandset_for_command

cmd2/cmd2.py:802–808  ·  view source on GitHub ↗

Find the CommandSet that registered the command name. :param command_name: command name to search :return: CommandSet that provided the command

(self, command_name: str)

Source from the content-addressed store, hash-verified

800 ]
801
802 def find_commandset_for_command(self, command_name: str) -> CommandSet[Any] | None:
803 """Find the CommandSet that registered the command name.
804
805 :param command_name: command name to search
806 :return: CommandSet that provided the command
807 """
808 return self._cmd_to_command_sets.get(command_name)
809
810 def _autoload_commands(self) -> None:
811 """Load modular command definitions."""

Callers 5

_perform_completionMethod · 0.95
sigint_handlerMethod · 0.95
getMethod · 0.80
test_load_commandsFunction · 0.80

Calls 1

getMethod · 0.45

Tested by 2

test_load_commandsFunction · 0.64