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

Method hook

tests/test_cmd2.py:601–604  ·  view source on GitHub ↗
(self: cmd2.Cmd, data: plugin.CommandFinalizationData)

Source from the content-addressed store, hash-verified

599 self.register_cmdfinalization_hook(self.hook)
600
601 def hook(self: cmd2.Cmd, data: plugin.CommandFinalizationData) -> plugin.CommandFinalizationData:
602 if self.in_script():
603 self.poutput("WE ARE IN SCRIPT")
604 return data
605
606 hook_app = HookApp()
607 test_dir = os.path.dirname(request.module.__file__)

Callers

nothing calls this directly

Calls 2

in_scriptMethod · 0.80
poutputMethod · 0.80

Tested by

no test coverage detected