Skip to content

Commit 10163ec

Browse files
authored
chore: 为类型检查添加 TYPE_CHECKING 的导入与阶段类型引用 (#5474)
1 parent 98b89eb commit 10163ec

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

astrbot/core/pipeline/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from __future__ import annotations
99

1010
from importlib import import_module
11-
from typing import Any
11+
from typing import TYPE_CHECKING, Any
1212

1313
from astrbot.core.message.message_event_result import (
1414
EventResultType,
@@ -17,6 +17,17 @@
1717

1818
from .stage_order import STAGES_ORDER
1919

20+
if TYPE_CHECKING:
21+
from .content_safety_check.stage import ContentSafetyCheckStage
22+
from .preprocess_stage.stage import PreProcessStage
23+
from .process_stage.stage import ProcessStage
24+
from .rate_limit_check.stage import RateLimitStage
25+
from .respond.stage import RespondStage
26+
from .result_decorate.stage import ResultDecorateStage
27+
from .session_status_check.stage import SessionStatusCheckStage
28+
from .waking_check.stage import WakingCheckStage
29+
from .whitelist_check.stage import WhitelistCheckStage
30+
2031
_LAZY_EXPORTS = {
2132
"ContentSafetyCheckStage": (
2233
"astrbot.core.pipeline.content_safety_check.stage",

0 commit comments

Comments
 (0)