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

Method register_command

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

Source from the content-addressed store, hash-verified

819 self.default_verb = ''
820
821 def register_command(self, verb, command, description=None, alias=None):
822 # type: (Any, CliCommand, Optional[str], Optional[str]) -> None
823 verb = verb.lower()
824 self._commands[verb] = command
825 if not description:
826 if isinstance(command, GroupCommandNew):
827 description = command.description
828 elif isinstance(command, Command):
829 parser = command.get_parser()
830 if parser:
831 description = parser.description
832 if description:
833 self._command_info[verb] = description
834 if alias:
835 self._aliases[alias] = verb
836
837 def execute_args(self, params, args, **kwargs): # type: (KeeperParams, str, dict) -> any
838 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