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

Method on_registered

cmd2/command_set.py:76–81  ·  view source on GitHub ↗

2nd step to registering, called by cmd2.Cmd after a CommandSet is registered and all its commands have been added. Subclasses can override this to perform custom steps related to the newly added commands (e.g. setting them to a disabled state).

(self)

Source from the content-addressed store, hash-verified

74 self._cmd_internal = cmd
75
76 def on_registered(self) -> None:
77 """2nd step to registering, called by cmd2.Cmd after a CommandSet is registered and all its commands have been added.
78
79 Subclasses can override this to perform custom steps related to the newly added commands (e.g. setting
80 them to a disabled state).
81 """
82
83 def on_unregister(self) -> None:
84 """First step to unregistering a CommandSet, called by ``cmd2.Cmd``.

Callers 1

register_command_setMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected