运行预处理。 装饰一个函数,使它在每次事件响应器运行前执行。
(func: T_RunPreProcessor)
| 112 | |
| 113 | |
| 114 | def 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 | |
| 125 | def run_postprocessor(func: T_RunPostProcessor) -> T_RunPostProcessor: |