Add add_signal method (#2061)

This commit is contained in:
Adam Hopkins
2021-03-14 14:06:27 +02:00
committed by GitHub
parent 824f41d6e0
commit d4660d0ca7
2 changed files with 18 additions and 0 deletions

View File

@@ -58,5 +58,14 @@ class SignalMixin:
return decorator
def add_signal(
self,
handler,
event: str,
condition: Dict[str, Any] = None,
):
self.signal(event=event, condition=condition)(handler)
return handler
def event(self, event: str):
raise NotImplementedError