Skip to content

Commit

Permalink
FIX: Hook and GeneratorHook typing
Browse files Browse the repository at this point in the history
By putting the star, I'm explicitly specifying that a hook is called with keyword arguments (was always the case)
  • Loading branch information
Pavel Perestoronin authored and eigenein committed Jan 29, 2024
1 parent 4bbaf21 commit 91b0315
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions time_execution/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Hook(Protocol):

def __call__(
self,
*,
response: Any,
exception: Optional[BaseException],
metric: Dict[str, Any],
Expand All @@ -108,6 +109,7 @@ class GeneratorHook(Protocol):

def __call__(
self,
*,
func: Callable[..., Any],
func_args: Tuple[Any, ...],
func_kwargs: Dict[str, Any],
Expand Down

0 comments on commit 91b0315

Please sign in to comment.