From 1cd46fd53c698f062995c2c45db57c07285a6f46 Mon Sep 17 00:00:00 2001 From: kotfu Date: Thu, 21 Jun 2018 15:13:52 -0600 Subject: Revise precommand hooks to use `data` parameter --- tests/test_plugin.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 98ad30ee..1f07f177 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -126,19 +126,19 @@ class Plugin: "A precommand hook with too many parameters" return one - def precmd_hook_no_parameter_type(self, mydat) -> plugin.PrecommandData: + def precmd_hook_no_parameter_type(self, data) -> plugin.PrecommandData: "A precommand hook with no type annotation on the parameter" - return mydat + return data - def precmd_hook_wrong_parameter_type(self, mydat: str) -> plugin.PrecommandData: + def precmd_hook_wrong_parameter_type(self, data: str) -> plugin.PrecommandData: "A precommand hook with the incorrect type annotation on the parameter" - return mydat + return data - def precmd_hook_no_return_type(self, mydat: plugin.PrecommandData): + def precmd_hook_no_return_type(self, data: plugin.PrecommandData): "A precommand hook with no type annotation on the return value" - return mydat + return data - def precmd_hook_wrong_return_type(self, mydat: plugin.PrecommandData) -> cmd2.Statement: + def precmd_hook_wrong_return_type(self, data: plugin.PrecommandData) -> cmd2.Statement: return self.statement_parser.parse('hi there') -- cgit v1.2.1