Skip to content

Commit

Permalink
Run pre-commit on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Aug 6, 2024
1 parent 7065e15 commit ad5058c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hookman/hookman_utils.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
4 changes: 2 additions & 2 deletions hookman/hooks.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions tests/test_hookman_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)):
Expand Down

0 comments on commit ad5058c

Please sign in to comment.