Skip to content

Commit

Permalink
fix: fix of list of Hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
hbredin committed Oct 22, 2023
1 parent 4b09aef commit ec4eb02
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pyannote/audio/pipelines/utils/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ def __exit__(self, *args):
if hasattr(hook, "__exit__"):
hook.__exit__(*args)

def __call__(self, *args: Any, **kwds: Any) -> Any:
def __call__(
self,
step_name: Text,
step_artifact: Any,
file: Optional[Mapping] = None,
total: Optional[int] = None,
completed: Optional[int] = None,
):
for hook in self.hooks:
hook(*args, **kwds)
hook(step_name, step_artifact, file=file, total=total, completed=completed)

0 comments on commit ec4eb02

Please sign in to comment.