aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2023-12-15 11:11:40 +0800
committer苏向夜 <fu050409@163.com>2023-12-15 11:11:40 +0800
commit66550a5a846959bebbccdf768e43edbddd94828a (patch)
tree77ff85897470c528e8974eeb45d7d590b0647699 /README.md
parent19a03fb28e2da256d65867c8c55bbb4d40b3c23d (diff)
downloadinfini-66550a5a846959bebbccdf768e43edbddd94828a.tar.gz
infini-66550a5a846959bebbccdf768e43edbddd94828a.zip
:memo: 修订文档
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/README.md b/README.md
index 1a43f5ac..888ae668 100644
--- a/README.md
+++ b/README.md
@@ -52,17 +52,17 @@
``` python
from infini import Handler, Result
- class MyRule(Rule):
- """自设规则包"""
+ __handlers__ = ["HandlerRule"]
- name = "MyRule"
- priority: int = 0
- def __init__(self) -> None:
- """初始化你的规则包"""
+ class HandlerRule(Handler):
+ """自设业务函数"""
+
+ name = "MyRule" # 规则包名
+ priority: int = 0 # 规则包权重
def process(self, **kwargs) -> Result:
- """声明规则包运行方式"""
+ """声明规则包检定方式"""
return Result("event1", True)
```