From c9ea3a749f7febb6dfe0f36001457e3907524ee7 Mon Sep 17 00:00:00 2001 From: kotfu Date: Thu, 21 Jun 2018 15:09:31 -0600 Subject: Use `data` instead of `params` --- tests/test_plugin.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/test_plugin.py') diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 39f35cb0..98ad30ee 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -52,44 +52,44 @@ class Plugin: # Postparsing hooks # ### - def postparse_hook(self, params: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: + def postparse_hook(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: "A postparsing hook" self.called_postparsing += 1 - return params + return data - def postparse_hook_stop(self, params: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: + def postparse_hook_stop(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: "A postparsing hook with requests application exit" self.called_postparsing += 1 - params.stop = True - return params + data.stop = True + return data - def postparse_hook_emptystatement(self, params: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: + def postparse_hook_emptystatement(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: "A postparsing hook with raises an EmptyStatement exception" self.called_postparsing += 1 raise cmd2.EmptyStatement - def postparse_hook_exception(self, params: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: + def postparse_hook_exception(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData: "A postparsing hook which raises an exception" self.called_postparsing += 1 raise ValueError - def postparse_hook_too_many_parameters(self, param1, param2) -> cmd2.plugin.PostparsingData: + def postparse_hook_too_many_parameters(self, data1, data2) -> cmd2.plugin.PostparsingData: "A postparsing hook with too many parameters" pass - def postparse_hook_undeclared_parameter_type(self, param) -> cmd2.plugin.PostparsingData: + def postparse_hook_undeclared_parameter_type(self, data) -> cmd2.plugin.PostparsingData: "A postparsing hook with an undeclared parameter type" pass - def postparse_hook_wrong_parameter_type(self, params: str) -> cmd2.plugin.PostparsingData: + def postparse_hook_wrong_parameter_type(self, data: str) -> cmd2.plugin.PostparsingData: "A postparsing hook with the wrong parameter type" pass - def postparse_hook_undeclared_return_type(self, params: cmd2.plugin.PostparsingData): + def postparse_hook_undeclared_return_type(self, data: cmd2.plugin.PostparsingData): "A postparsing hook with an undeclared return type" pass - def postparse_hook_wrong_return_type(self, params: cmd2.plugin.PostparsingData) -> str: + def postparse_hook_wrong_return_type(self, data: cmd2.plugin.PostparsingData) -> str: "A postparsing hook with the wrong return type" pass -- cgit v1.2.1