From b0b825d0cdc0e38b48477719c608a065692f413d Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Fri, 17 Jul 2020 16:01:54 -0400 Subject: Fixed hook documentation --- cmd2/cmd2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd2/cmd2.py') diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 65047cc8..cdee3523 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -4281,11 +4281,11 @@ class Cmd(cmd.Cmd): signature = inspect.signature(func) _, param = list(signature.parameters.items())[0] if param.annotation != plugin.CommandFinalizationData: - raise TypeError("{} must have one parameter declared with type " - "'cmd2.plugin.CommandFinalizationData'".format(func.__name__)) + raise TypeError("{} must have one parameter declared with type {}".format(func.__name__, + plugin.CommandFinalizationData)) if signature.return_annotation != plugin.CommandFinalizationData: - raise TypeError("{} must declare return a return type of " - "'cmd2.plugin.CommandFinalizationData'".format(func.__name__)) + raise TypeError("{} must declare return a return type of {}".format(func.__name__, + plugin.CommandFinalizationData)) def register_cmdfinalization_hook(self, func: Callable[[plugin.CommandFinalizationData], plugin.CommandFinalizationData]) -> None: -- cgit v1.2.1