diff options
author | kotfu <kotfu@kotfu.net> | 2018-06-21 15:09:31 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-06-21 15:09:31 -0600 |
commit | c9ea3a749f7febb6dfe0f36001457e3907524ee7 (patch) | |
tree | b3b7b3d1b5935665c82c6753f17d654e545570e0 /tests/test_plugin.py | |
parent | 7298501357504312e137180c99c05a40f49eb48a (diff) | |
download | cmd2-git-c9ea3a749f7febb6dfe0f36001457e3907524ee7.tar.gz |
Use `data` instead of `params`
Diffstat (limited to 'tests/test_plugin.py')
-rw-r--r-- | tests/test_plugin.py | 24 |
1 files changed, 12 insertions, 12 deletions
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 |