mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 01:02:37 +00:00
Add type: ignore for pre-existing protobuf stub issues
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -14,7 +14,7 @@ from typing import TYPE_CHECKING
|
||||
|
||||
from a2a.client.errors import A2AClientError
|
||||
from a2a.types import AgentCapabilities, AgentCard, AgentInterface, AgentSkill
|
||||
from google.protobuf.json_format import ParseDict
|
||||
from google.protobuf.json_format import ParseDict # type: ignore[import-untyped]
|
||||
|
||||
from crewai.a2a._compat import agent_card_to_dict, agent_card_protocol_version, proto_copy
|
||||
from aiocache import cached # type: ignore[import-untyped]
|
||||
@@ -280,7 +280,7 @@ async def _afetch_agent_card_impl(
|
||||
)
|
||||
response.raise_for_status()
|
||||
|
||||
agent_card = ParseDict(response.json(), AgentCard())
|
||||
agent_card: AgentCard = ParseDict(response.json(), AgentCard()) # type: ignore[assignment]
|
||||
fetch_time_ms = (time.perf_counter() - start_time) * 1000
|
||||
agent_card_dict = agent_card_to_dict(agent_card)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import logging
|
||||
from typing import Any, Literal
|
||||
|
||||
from a2a.types import AgentCard, AgentCardSignature
|
||||
from google.protobuf.json_format import MessageToDict
|
||||
from google.protobuf.json_format import MessageToDict # type: ignore[import-untyped]
|
||||
import jwt
|
||||
from pydantic import SecretStr
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@ async def aexecute_a2a_delegation(
|
||||
turn_number=turn_number,
|
||||
agent_branch=agent_branch,
|
||||
agent_id=agent_id,
|
||||
agent_role=agent_role,
|
||||
agent_role=agent_role, # type: ignore[arg-type]
|
||||
response_model=response_model,
|
||||
updates=updates,
|
||||
from_task=from_task,
|
||||
|
||||
@@ -81,7 +81,7 @@ def _get_data_parts(parts: list[Part]) -> list[dict[str, Any]]:
|
||||
result: list[dict[str, Any]] = []
|
||||
for part in parts:
|
||||
if part_has_data(part):
|
||||
from google.protobuf.json_format import MessageToDict
|
||||
from google.protobuf.json_format import MessageToDict # type: ignore[import-untyped]
|
||||
|
||||
val = MessageToDict(part.data)
|
||||
if isinstance(val, dict):
|
||||
|
||||
Reference in New Issue
Block a user