Asynchronously invoke an event on an addon and all its children.
(self, addon, event: hooks.Hook)
| 262 | ) |
| 263 | |
| 264 | async def invoke_addon(self, addon, event: hooks.Hook): |
| 265 | """ |
| 266 | Asynchronously invoke an event on an addon and all its children. |
| 267 | """ |
| 268 | for addon, func in self._iter_hooks(addon, event): |
| 269 | res = func(*event.args()) |
| 270 | # Support both async and sync hook functions |
| 271 | if res is not None and inspect.isawaitable(res): |
| 272 | await res |
| 273 | |
| 274 | def invoke_addon_sync(self, addon, event: hooks.Hook): |
| 275 | """ |
no test coverage detected