Remove a callback from a hook.
(self, name, func)
| 1479 | if self.app and was_empty and not self._empty(): self.app.reset() |
| 1480 | |
| 1481 | def remove(self, name, func): |
| 1482 | ''' Remove a callback from a hook. ''' |
| 1483 | was_empty = self._empty() |
| 1484 | if name in self.hooks and func in self.hooks[name]: |
| 1485 | self.hooks[name].remove(func) |
| 1486 | if self.app and not was_empty and self._empty(): self.app.reset() |
| 1487 | |
| 1488 | def trigger(self, name, *a, **ka): |
| 1489 | ''' Trigger a hook and return a list of results. ''' |
no test coverage detected