MCPcopy
hub / github.com/nonebot/nonebot2 / run_preprocessor

Function run_preprocessor

nonebot/message.py:114–122  ·  view source on GitHub ↗

运行预处理。 装饰一个函数,使它在每次事件响应器运行前执行。

(func: T_RunPreProcessor)

Source from the content-addressed store, hash-verified

112
113
114def run_preprocessor(func: T_RunPreProcessor) -> T_RunPreProcessor:
115 """运行预处理。
116
117 装饰一个函数,使它在每次事件响应器运行前执行。
118 """
119 _run_preprocessors.add(
120 Dependent[Any].parse(call=func, allow_types=RUN_PREPCS_PARAMS)
121 )
122 return func
123
124
125def run_postprocessor(func: T_RunPostProcessor) -> T_RunPostProcessor:

Callers

nothing calls this directly

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected