Skip to content

Commit

Permalink
Use pluggy's new public HookCaller type for type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
faph committed Nov 1, 2023
1 parent a0c2200 commit b6d2656
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies = [
"fastavro~=1.8", # TODO: consider moving Avro-related dependencies to optional dependencies
"memoization~=0.4",
"orjson~=3.0",
"pluggy~=1.2",
"pluggy~=1.3",
"py-avro-schema~=3.0",
"python-dateutil~=2.8",
]
Expand Down
4 changes: 1 addition & 3 deletions src/py_adapter/plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import pluggy

if TYPE_CHECKING:
from pluggy._hooks import _HookCaller

import py_adapter

logger = logging.getLogger(__package__)
Expand Down Expand Up @@ -66,7 +64,7 @@ def _load_default_plugins(manager_: pluggy.PluginManager) -> None:
manager_.register(plugin, name=name)


def plugin_hook(plugin_name: str, hook_name: str) -> "_HookCaller":
def plugin_hook(plugin_name: str, hook_name: str) -> pluggy.HookCaller:
"""
Return a hook (caller) for a single named plugin and hook name
Expand Down

0 comments on commit b6d2656

Please sign in to comment.