fix(types): clear host mypy debt and prevent typing regressions

严格检查全部宿主源码,清零类型错误预算并移除按模块类型豁免。
按原因、所属方法、错误码及语法指纹锁定必要兼容例外和站点类型桩,
CI 阻断新增忽略、检查范围退化、本地桩替代真实接口及新的类型错误。

修复空值、异步和供应方类型边界,保持插件与 API 兼容合同,
并补充存储、订阅、通知、Agent 和工作流边界的回归覆盖。
This commit is contained in:
jxxghp
2026-10-21 22:03:18 +08:00
parent 453a956819
commit 6d4ce83837
370 changed files with 8014 additions and 5627 deletions

View File

@@ -15,8 +15,7 @@ from app.agent.tools.tags import ToolTag
from app.runtime.settings import get_runtime_setting
# Pydantic 在运行时生成模型成员,当前类型检查环境无法完整解析其动态基类。
class ExecuteCodeInput(BaseModel): # type: ignore[misc]
class ExecuteCodeInput(BaseModel):
"""
代码与显式重置状态;身份、工具集合和预算由宿主提供,不由模型选择。
"""
@@ -88,7 +87,7 @@ class ExecuteCodeTool(MoviePilotTool):
"""
return None
async def run(self, **kwargs: Any) -> str:
async def run(self, **kwargs: Any) -> str: # type: ignore[override]
"""
只有真实宿主工具链绑定的当前 cell 可执行,直接外部调用不能获得默认身份。
"""