From 1bc2e06be2a2ae25befbab6b8d8dc7ee2a10a8df Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Sat, 5 Feb 2022 21:08:17 +0100 Subject: [PATCH] fix flake8 error --- tests/plugins/test_plugins.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/plugins/test_plugins.py b/tests/plugins/test_plugins.py index bfacac3..436e546 100644 --- a/tests/plugins/test_plugins.py +++ b/tests/plugins/test_plugins.py @@ -29,11 +29,13 @@ def _verify_module(module, plugin_module_name): continue obj = clazz(_TestContext()) - with pytest.raises(AttributeError, match=f"'{name}' object has no attribute '{_INVALID_METHOD}'"): + with pytest.raises( + AttributeError, + match=f"'{name}' object has no attribute '{_INVALID_METHOD}'", + ): getattr(obj, _INVALID_METHOD) assert hasattr(obj, _INVALID_METHOD) is False - for name, obj in inspect.getmembers(module, inspect.ismodule): _verify_module(obj, plugin_module_name) @@ -45,7 +47,7 @@ def test_plugins_correct_has_attr(): continue name = file.replace("/", ".") - name = name[name.find(module.__name__) : -3].removesuffix(".__init__") + name = name[name.find(module.__name__): -3].removesuffix(".__init__") __import__(name)