Register a function to be called after parsing user input but before running the command.
(self, func: Callable[[plugin.PostparsingData], plugin.PostparsingData])
| 5852 | raise TypeError(f"{func.__name__} must declare return a return type of 'cmd2.plugin.PostparsingData'") |
| 5853 | |
| 5854 | def register_postparsing_hook(self, func: Callable[[plugin.PostparsingData], plugin.PostparsingData]) -> None: |
| 5855 | """Register a function to be called after parsing user input but before running the command.""" |
| 5856 | self._validate_postparsing_callable(func) |
| 5857 | self._postparsing_hooks.append(func) |
| 5858 | |
| 5859 | CommandDataType = TypeVar("CommandDataType") |
| 5860 |