Add add_signal method (#2061)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user