diff --git a/hookman/hookman_utils.py b/hookman/hookman_utils.py index d09819e..2cfe763 100644 --- a/hookman/hookman_utils.py +++ b/hookman/hookman_utils.py @@ -1,10 +1,10 @@ import ctypes import os import sys +from collections.abc import Sequence from contextlib import contextmanager from pathlib import Path from typing import List -from typing import Sequence from typing import Union diff --git a/hookman/hooks.py b/hookman/hooks.py index 41a67b9..eda07f4 100644 --- a/hookman/hooks.py +++ b/hookman/hooks.py @@ -1,10 +1,10 @@ import inspect import shutil +from collections.abc import Callable +from collections.abc import Sequence from pathlib import Path -from typing import Callable from typing import List from typing import Optional -from typing import Sequence from zipfile import ZipFile from hookman import hookman_utils diff --git a/tests/test_hookman_generator.py b/tests/test_hookman_generator.py index d2d7de5..e6df4fd 100644 --- a/tests/test_hookman_generator.py +++ b/tests/test_hookman_generator.py @@ -194,8 +194,10 @@ def test_generate_plugin_package_invalid_shared_lib_name(acme_hook_specs_file, t ) -@pytest.mark.parametrize('package_name_extra', [None, 'foo']) -def test_generate_plugin_package(acme_hook_specs_file, tmpdir, mock_plugin_id_from_dll, package_name_extra): +@pytest.mark.parametrize("package_name_extra", [None, "foo"]) +def test_generate_plugin_package( + acme_hook_specs_file, tmpdir, mock_plugin_id_from_dll, package_name_extra +): hg = HookManGenerator(hook_spec_file_path=acme_hook_specs_file) plugin_id = "acme" hg.generate_plugin_template( @@ -299,7 +301,7 @@ def test_generate_plugin_package_with_missing_folders(acme_hook_specs_file, tmpd # -- Without a shared library binary shared_lib_extension = "*.dll" if sys.platform == "win32" else "*.so" - string_to_match = fr"Unable to locate a shared library ({shared_lib_extension}) in" + string_to_match = rf"Unable to locate a shared library ({shared_lib_extension}) in" import re with pytest.raises(FileNotFoundError, match=re.escape(string_to_match)):