fix flake8 error

pull/101/head
Robert Resch 2022-02-05 21:08:17 +01:00 zatwierdzone przez Florian Ludwig
rodzic 5181289d2b
commit 1bc2e06be2
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -29,11 +29,13 @@ def _verify_module(module, plugin_module_name):
continue continue
obj = clazz(_TestContext()) 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) getattr(obj, _INVALID_METHOD)
assert hasattr(obj, _INVALID_METHOD) is False assert hasattr(obj, _INVALID_METHOD) is False
for name, obj in inspect.getmembers(module, inspect.ismodule): for name, obj in inspect.getmembers(module, inspect.ismodule):
_verify_module(obj, plugin_module_name) _verify_module(obj, plugin_module_name)
@ -45,7 +47,7 @@ def test_plugins_correct_has_attr():
continue continue
name = file.replace("/", ".") name = file.replace("/", ".")
name = name[name.find(module.__name__) : -3].removesuffix(".__init__") name = name[name.find(module.__name__): -3].removesuffix(".__init__")
__import__(name) __import__(name)