[Chore/Refactor] Improve type checking configuration (#25185)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
-LAN- 2025-09-05 08:34:18 +08:00 committed by GitHub
commit a2e0f80c01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 73 additions and 47 deletions

View file

@ -1,6 +1,6 @@
from collections.abc import Generator
from dataclasses import dataclass, field
from typing import TypeVar, Union
from typing import TypeVar, Union, cast
from core.agent.entities import AgentInvokeMessage
from core.tools.entities.tool_entities import ToolInvokeMessage
@ -85,7 +85,7 @@ def merge_blob_chunks(
message=ToolInvokeMessage.BlobMessage(blob=files[chunk_id].data[: files[chunk_id].bytes_written]),
meta=resp.meta,
)
yield merged_message
yield cast(MessageType, merged_message)
# Clean up the buffer
del files[chunk_id]
else: