Register a hook to be called after the command function.
(self, func: Callable[[plugin.PostcommandData], plugin.PostcommandData])
| 5885 | self._precmd_hooks.append(func) |
| 5886 | |
| 5887 | def register_postcmd_hook(self, func: Callable[[plugin.PostcommandData], plugin.PostcommandData]) -> None: |
| 5888 | """Register a hook to be called after the command function.""" |
| 5889 | self._validate_prepostcmd_hook(func, plugin.PostcommandData) |
| 5890 | self._postcmd_hooks.append(func) |
| 5891 | |
| 5892 | @classmethod |
| 5893 | def _validate_cmdfinalization_callable( |