From c6527e2e6ed35a21547feb796e742e7955fc07fd Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 17 Oct 2026 09:32:04 +0800 Subject: [PATCH] mypy: type workflow event action parameters --- app/workflow/actions/send_event.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/workflow/actions/send_event.py b/app/workflow/actions/send_event.py index 6a234ce64..d8e869cdb 100644 --- a/app/workflow/actions/send_event.py +++ b/app/workflow/actions/send_event.py @@ -26,13 +26,13 @@ class SendEventAction(BaseAction): def success(self) -> bool: return self.done - def execute(self, workflow_id: int, params: dict, context: ActionContext) -> ActionContext: + def execute(self, workflow_id: int, params: dict[str, object], context: ActionContext) -> ActionContext: """ 发送工作流事件,以更插件干预工作流执行 """ # 触发资源下载事件,更新执行上下文 event = eventmanager.send_event(ChainEventType.WorkflowExecution, context) - if event and event.event_data: + if event and isinstance(event.event_data, ActionContext): context = event.event_data self.job_done()