diff options
-rw-r--r-- | cmd2/cmd2.py | 11 | ||||
-rw-r--r-- | docs/hooks.rst | 2 |
2 files changed, 1 insertions, 12 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 04758ed7..05902a3c 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -1620,15 +1620,6 @@ class Cmd(cmd.Cmd): return raw # noinspection PyMethodMayBeStatic - def postparse(self, statement: Statement) -> Statement: - """Hook that runs immediately after parsing the user input. - - :param statement: Statement object populated by parsing - :return: Statement - potentially modified Statement object - """ - return statement - - # noinspection PyMethodMayBeStatic def postparsing_precmd(self, statement: Statement) -> Tuple[bool, Statement]: """This runs after parsing the command-line, but before anything else; even before adding cmd to history. @@ -1688,7 +1679,7 @@ class Cmd(cmd.Cmd): import datetime stop = False try: - statement = self._complete_statement(line) + statement = self._complete_statement(self.preparse(line)) (stop, statement) = self.postparsing_precmd(statement) if stop: return self.postparsing_postcmd(stop) diff --git a/docs/hooks.rst b/docs/hooks.rst index c28f9b8f..1e96e963 100644 --- a/docs/hooks.rst +++ b/docs/hooks.rst @@ -50,8 +50,6 @@ the various hook methods, presented in chronological order starting with the one .. automethod:: cmd2.cmd2.Cmd.preparse -.. automethod:: cmd2.cmd2.Cmd.postparse - .. automethod:: cmd2.cmd2.Cmd.postparsing_precmd .. automethod:: cmd2.cmd2.Cmd.precmd |