From cac380dde3bcdff58cbe3542eadc7a50b82b00c2 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 17 Oct 2026 05:23:58 +0800 Subject: [PATCH] fix(types): complete Redis module lifecycle --- app/modules/redis/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/modules/redis/__init__.py b/app/modules/redis/__init__.py index 144f4a1e4..4ad56ee93 100644 --- a/app/modules/redis/__init__.py +++ b/app/modules/redis/__init__.py @@ -1,4 +1,4 @@ -from typing import Tuple, Union +from typing import Optional, Tuple from app.modules import _ModuleBase from app.runtime.cache import probe_redis_cache @@ -41,7 +41,7 @@ class RedisModule(_ModuleBase): """ return 0 - def init_setting(self) -> Tuple[str, Union[str, bool]]: + def init_setting(self) -> None: """缓存后端由部署配置决定,不声明独立模块开关。""" pass @@ -49,7 +49,7 @@ class RedisModule(_ModuleBase): """缓存 adapter 负责连接释放,本模块无独立资源。""" pass - def test(self): + def test(self) -> Optional[Tuple[bool, str]]: """ 测试模块连接性 """