MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / register_command

Method register_command

keepercommander/commands/base.py:835–849  ·  view source on GitHub ↗
(self, verb, command, description=None, alias=None)

Source from the content-addressed store, hash-verified

833 self.default_verb = ''
834
835 def register_command(self, verb, command, description=None, alias=None):
836 # type: (Any, CliCommand, Optional[str], Optional[str]) -> None
837 verb = verb.lower()
838 self._commands[verb] = command
839 if not description:
840 if isinstance(command, GroupCommandNew):
841 description = command.description
842 elif isinstance(command, Command):
843 parser = command.get_parser()
844 if parser:
845 description = parser.description
846 if description:
847 self._command_info[verb] = description
848 if alias:
849 self._aliases[alias] = verb
850
851 def execute_args(self, params, args, **kwargs): # type: (KeeperParams, str, dict) -> any
852 if args.startswith('-- '):

Callers 15

__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80

Calls 1

get_parserMethod · 0.45

Tested by

no test coverage detected