From 38006103dce6cbc383dafe2962df035f3b018261 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 4 Mar 2024 16:31:20 -0700 Subject: [PATCH] Fixed typo 'must by' to 'must be' (#82769) --- lib/ansible/module_utils/common/parameters.py | 2 +- .../module_utils/common/parameters/test_list_no_log_values.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/common/parameters.py b/lib/ansible/module_utils/common/parameters.py index 9e74f59f26d..66473e94e90 100644 --- a/lib/ansible/module_utils/common/parameters.py +++ b/lib/ansible/module_utils/common/parameters.py @@ -347,7 +347,7 @@ def _list_no_log_values(argument_spec, params): sub_param = check_type_dict(sub_param) if not isinstance(sub_param, Mapping): - raise TypeError("Value '{1}' in the sub parameter field '{0}' must by a {2}, " + raise TypeError("Value '{1}' in the sub parameter field '{0}' must be a {2}, " "not '{1.__class__.__name__}'".format(arg_name, sub_param, wanted_type)) no_log_values.update(_list_no_log_values(sub_argument_spec, sub_param)) diff --git a/test/units/module_utils/common/parameters/test_list_no_log_values.py b/test/units/module_utils/common/parameters/test_list_no_log_values.py index 9cfcecf3219..555e07b52b0 100644 --- a/test/units/module_utils/common/parameters/test_list_no_log_values.py +++ b/test/units/module_utils/common/parameters/test_list_no_log_values.py @@ -78,7 +78,7 @@ def test_list_no_log_values_invalid_suboptions(argument_spec, module_parameters, } } - with pytest.raises(TypeError, match=r"(Value '.*?' in the sub parameter field '.*?' must by a dict, not '.*?')" + with pytest.raises(TypeError, match=r"(Value '.*?' in the sub parameter field '.*?' must be a dict, not '.*?')" r"|(dictionary requested, could not parse JSON or key=value)"): _list_no_log_values(argument_spec(extra_opts), module_parameters(extra_params))