chore: 为类型检查添加 TYPE_CHECKING 的导入与阶段类型引用 (#5474)

This commit is contained in:
Dt8333
2026-02-26 14:19:52 +08:00
committed by GitHub
parent 98b89ebcc5
commit 10163ec78a
+12 -1
View File
@@ -8,7 +8,7 @@ resolution for backward compatibility.
from __future__ import annotations
from importlib import import_module
from typing import Any
from typing import TYPE_CHECKING, Any
from astrbot.core.message.message_event_result import (
EventResultType,
@@ -17,6 +17,17 @@ from astrbot.core.message.message_event_result import (
from .stage_order import STAGES_ORDER
if TYPE_CHECKING:
from .content_safety_check.stage import ContentSafetyCheckStage
from .preprocess_stage.stage import PreProcessStage
from .process_stage.stage import ProcessStage
from .rate_limit_check.stage import RateLimitStage
from .respond.stage import RespondStage
from .result_decorate.stage import ResultDecorateStage
from .session_status_check.stage import SessionStatusCheckStage
from .waking_check.stage import WakingCheckStage
from .whitelist_check.stage import WhitelistCheckStage
_LAZY_EXPORTS = {
"ContentSafetyCheckStage": (
"astrbot.core.pipeline.content_safety_check.stage",