aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-12-18 01:35:59 +0800
committerGitHub <noreply@github.com>2023-12-18 01:35:59 +0800
commit29512b9cb2984aa633c49ac7db8fd9556c0d98b9 (patch)
treef76f697c9de1e47026c697751d4c9076ce2511cf
parent487a6eadc650d3f6ea0a28f428f982d6478da6f5 (diff)
downloadinfini-29512b9cb2984aa633c49ac7db8fd9556c0d98b9.tar.gz
infini-29512b9cb2984aa633c49ac7db8fd9556c0d98b9.zip
chore(event): add `_str__` method
-rw-r--r--src/infini/event.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/infini/event.py b/src/infini/event.py
index 649103c9..9c6bd41b 100644
--- a/src/infini/event.py
+++ b/src/infini/event.py
@@ -34,9 +34,12 @@ class MessageEvent(InfiniEvent):
self.name = name
self.kwargs = kwargs
- def __repr__(self) -> str:
+ def __str__(self) -> str:
return f"<MessageEvent [{self.name}]>"
+ def __repr__(self) -> str:
+ return self.__str__()
+
class WorkflowEvent(InfiniEvent):
"""Workflow 事件"""