diff options
author | kotfu <kotfu@kotfu.net> | 2018-05-31 22:27:42 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-05-31 22:27:42 -0600 |
commit | 005882faeb058da201079b8496eb9322f7da0cfc (patch) | |
tree | f2dbf3a3f9b9f49a2da8fcdbd69d8d293153009f | |
parent | 0490d934841fb7da351249fb93d663986e59f184 (diff) | |
download | cmd2-git-005882faeb058da201079b8496eb9322f7da0cfc.tar.gz |
reminder to check for registered function signatures
-rw-r--r-- | cmd2/cmd2.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 1fcfa85e..63ad1ea2 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -3109,22 +3109,27 @@ Script should contain one command per line, just like command would be typed in def register_preloop_hook(self, func): """Register a function to be called at the beginning of the command loop.""" self._preloop_hooks.append(func) + # TODO check signature of registered func and throw error if it's wrong def register_postloop_hook(self, func): """Register a function to be called at the end of the command loop.""" self._postloop_hooks.append(func) + # TODO check signature of registered func and throw error if it's wrong def register_postparsing_hook(self, func): """Register a function to be called after parsing user input but before running the command""" self._postparsing_hooks.append(func) + # TODO check signature of registered func and throw error if it's wrong def register_precmd_hook(self, func): """Register a function to be called before the command function.""" self._precmd_hooks.append(func) + # TODO check signature of registered func and throw error if it's wrong def register_postcmd_hook(self, func): """Register a function to be called after the command function.""" self._postcmd_hooks.append(func) + # TODO check signature of registered func and throw error if it's wrong class HistoryItem(str): |