chore: lint 修复(TC001/TC003 类型导入优化)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-11
@@ -1,11 +1,13 @@
|
||||
"""Agent 专属 Protocol 端口。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Protocol, runtime_checkable
|
||||
from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable
|
||||
|
||||
import pluggy
|
||||
|
||||
from core.agent.types import LoopResult, Step
|
||||
if TYPE_CHECKING:
|
||||
from core.agent.types import LoopResult, Step
|
||||
|
||||
hookspec = pluggy.HookspecMarker("agent_loop")
|
||||
hookimpl = pluggy.HookimplMarker("agent_loop")
|
||||
@@ -27,19 +29,13 @@ class AgentLoopSpec:
|
||||
"""
|
||||
|
||||
@hookspec
|
||||
async def before_step(
|
||||
self, iteration: int, messages: list[dict[str, Any]]
|
||||
) -> None: ...
|
||||
async def before_step(self, iteration: int, messages: list[dict[str, Any]]) -> None: ...
|
||||
|
||||
@hookspec
|
||||
async def after_tool(
|
||||
self, iteration: int, step: Step
|
||||
) -> str | None: ...
|
||||
async def after_tool(self, iteration: int, step: Step) -> str | None: ...
|
||||
|
||||
@hookspec
|
||||
async def after_step(
|
||||
self, iteration: int, messages: list[dict[str, Any]]
|
||||
) -> None: ...
|
||||
async def after_step(self, iteration: int, messages: list[dict[str, Any]]) -> None: ...
|
||||
|
||||
@hookspec
|
||||
async def on_finish(self, result: LoopResult) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user