From 5f263147f95de641967b2784566cf59aa8c286a0 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Tue, 16 Sep 2025 12:51:11 +0800 Subject: [PATCH] fix: make mypy happy --- api/core/workflow/graph_engine/graph_engine.py | 3 ++- api/core/workflow/graph_engine/ready_queue/in_memory.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/core/workflow/graph_engine/graph_engine.py b/api/core/workflow/graph_engine/graph_engine.py index dc85619421..434ad4fc5e 100644 --- a/api/core/workflow/graph_engine/graph_engine.py +++ b/api/core/workflow/graph_engine/graph_engine.py @@ -39,7 +39,7 @@ from .graph_traversal import EdgeProcessor, SkipPropagator from .layers.base import GraphEngineLayer from .orchestration import Dispatcher, ExecutionCoordinator from .protocols.command_channel import CommandChannel -from .ready_queue import ReadyQueueState, create_ready_queue_from_state +from .ready_queue import ReadyQueue, ReadyQueueState, create_ready_queue_from_state from .response_coordinator import ResponseStreamCoordinator from .worker_management import WorkerPool @@ -106,6 +106,7 @@ class GraphEngine: # === Execution Queues === # Create ready queue from saved state or initialize new one + self._ready_queue: ReadyQueue if self._graph_runtime_state.ready_queue_json == "": self._ready_queue = InMemoryReadyQueue() else: diff --git a/api/core/workflow/graph_engine/ready_queue/in_memory.py b/api/core/workflow/graph_engine/ready_queue/in_memory.py index e01ecdc160..f2c265ece0 100644 --- a/api/core/workflow/graph_engine/ready_queue/in_memory.py +++ b/api/core/workflow/graph_engine/ready_queue/in_memory.py @@ -8,11 +8,11 @@ serialization capabilities for state storage. import queue from typing import final -from .protocol import ReadyQueueState +from .protocol import ReadyQueue, ReadyQueueState @final -class InMemoryReadyQueue: +class InMemoryReadyQueue(ReadyQueue): """ In-memory ready queue implementation with serialization support.