Skip to content

Commit bd30bdf

Browse files
committed
Fix type annotation: use Callable instead of callable
1 parent d954a52 commit bd30bdf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/deepwork/hooks/wrapper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def my_hook(input_data: HookInput) -> HookOutput:
3939

4040
import json
4141
import sys
42+
from collections.abc import Callable
4243
from dataclasses import dataclass, field
4344
from enum import Enum
4445
from typing import Any
@@ -178,7 +179,7 @@ class HookInput:
178179
raw_input: dict[str, Any] = field(default_factory=dict)
179180

180181
@classmethod
181-
def from_dict(cls, data: dict[str, Any], platform: Platform) -> "HookInput":
182+
def from_dict(cls, data: dict[str, Any], platform: Platform) -> HookInput:
182183
"""Create HookInput from raw platform-specific input."""
183184
# Get event name and normalize
184185
raw_event = data.get("hook_event_name", "")
@@ -317,7 +318,7 @@ def write_stdout(data: str) -> None:
317318

318319

319320
def run_hook(
320-
hook_fn: callable,
321+
hook_fn: Callable[[HookInput], HookOutput],
321322
platform: Platform,
322323
) -> int:
323324
"""

0 commit comments

Comments
 (0)