From 6da6110432631dec1977cfbf2c86b11020c1a9b3 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman <rjeffman@redhat.com> Date: Thu, 1 Dec 2022 10:00:58 -0300 Subject: [PATCH] Fix issues raised by Flake8 version 5.0.3 --- plugins/module_utils/ansible_freeipa_module.py | 4 ++-- utils/get_test_modules.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/ansible_freeipa_module.py b/plugins/module_utils/ansible_freeipa_module.py index b71c78c9..ff7b06dc 100644 --- a/plugins/module_utils/ansible_freeipa_module.py +++ b/plugins/module_utils/ansible_freeipa_module.py @@ -1125,8 +1125,8 @@ class IPAAnsibleModule(AnsibleModule): def ipa_get_domain(self): """Retrieve IPA API domain.""" if not hasattr(self, "__ipa_api_domain"): - setattr(self, "__ipa_api_domain", api_get_domain()) - return getattr(self, "__ipa_api_domain") + setattr(self, "__ipa_api_domain", api_get_domain()) # noqa: B010 + return getattr(self, "__ipa_api_domain") # noqa: B009 @staticmethod def ipa_get_realm(): diff --git a/utils/get_test_modules.py b/utils/get_test_modules.py index 1e7518c5..cb20e0d6 100644 --- a/utils/get_test_modules.py +++ b/utils/get_test_modules.py @@ -84,7 +84,7 @@ def get_plugins_from_playbook(playbook): def import_mock(name, *args): """Intercept 'import' calls and store module name.""" if not hasattr(import_mock, "call_list"): - setattr(import_mock, "call_list", set()) + setattr(import_mock, "call_list", set()) # noqa: B010 import_mock.call_list.add(name) # pylint: disable=no-member try: # print("NAME:", name) -- GitLab