MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / trigger_hook

Method trigger_hook

21-async/mojifinder/bottle.py:644–646  ·  view source on GitHub ↗

Trigger a hook and return a list of results.

(self, __name, *args, **kwargs)

Source from the content-addressed store, hash-verified

642 return True
643
644 def trigger_hook(self, __name, *args, **kwargs):
645 ''' Trigger a hook and return a list of results. '''
646 return [hook(*args, **kwargs) for hook in self._hooks[__name][:]]
647
648 def hook(self, name):
649 """ Return a decorator that attaches a callback to a hook. See

Callers 2

resetMethod · 0.95
_handleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected