aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-12-18 02:29:15 +0800
committer简律纯 <i@jyunko.cn>2023-12-18 02:29:15 +0800
commit211142f9f82a5c6a38c4b8a07473b17167321c12 (patch)
tree1908c6cd80eb56b99e1059f49394b141899c7a94
parent68ab4a7d835e7ede363d3bc9fa2731a4a335f4a0 (diff)
downloadinfini-211142f9f82a5c6a38c4b8a07473b17167321c12.tar.gz
infini-211142f9f82a5c6a38c4b8a07473b17167321c12.zip
chore(handler): add annotation
-rw-r--r--src/infini/handler.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/infini/handler.py b/src/infini/handler.py
index 7c0ee73d..fcbf32f9 100644
--- a/src/infini/handler.py
+++ b/src/infini/handler.py
@@ -1,3 +1,10 @@
+"""Infini Handler
+
+此类是所有规则包业务类的基类。
+每个规则包业务类都需要定义一个名为 process 的抽象方法, 用于接收和处理传入的 MatcherEvent 事件,并返回一个 InfiniEvent 事件。
+此外,每个规则包业务类还可以定义一个名为 priority 的类属性,用于指定该业务类的优先级。优先级越高,该业务类处理事件的顺序越靠前。
+"""
+
from abc import ABCMeta, abstractmethod
from .event import MatcherEvent, InfiniEvent