From 8aab7f49c3923100d560d6c02f057c67816b2d81 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Thu, 28 Aug 2025 05:09:33 +0800 Subject: [PATCH] chore(graph_engine): Use `XXX | None` instead of `Optional[XXX]` --- .../workflow/graph_engine/command_channels/redis_channel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/workflow/graph_engine/command_channels/redis_channel.py b/api/core/workflow/graph_engine/command_channels/redis_channel.py index 6feb8b8a25..0350044690 100644 --- a/api/core/workflow/graph_engine/command_channels/redis_channel.py +++ b/api/core/workflow/graph_engine/command_channels/redis_channel.py @@ -7,7 +7,7 @@ Each instance uses a unique key for its command queue. """ import json -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING from ..entities.commands import AbortCommand, CommandType, GraphEngineCommand @@ -86,7 +86,7 @@ class RedisChannel: pipe.expire(self._key, self._command_ttl) pipe.execute() - def _deserialize_command(self, data: dict) -> Optional[GraphEngineCommand]: + def _deserialize_command(self, data: dict) -> GraphEngineCommand | None: """ Deserialize a command from dictionary data.