diff --git a/lib/crewai/src/crewai/a2a/utils/agent_card.py b/lib/crewai/src/crewai/a2a/utils/agent_card.py index 8b64312ad..69ef28c4b 100644 --- a/lib/crewai/src/crewai/a2a/utils/agent_card.py +++ b/lib/crewai/src/crewai/a2a/utils/agent_card.py @@ -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) diff --git a/lib/crewai/src/crewai/a2a/utils/agent_card_signing.py b/lib/crewai/src/crewai/a2a/utils/agent_card_signing.py index 9f0b79d5c..116123974 100644 --- a/lib/crewai/src/crewai/a2a/utils/agent_card_signing.py +++ b/lib/crewai/src/crewai/a2a/utils/agent_card_signing.py @@ -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 diff --git a/lib/crewai/src/crewai/a2a/utils/delegation.py b/lib/crewai/src/crewai/a2a/utils/delegation.py index cae2dee19..e2dcfed53 100644 --- a/lib/crewai/src/crewai/a2a/utils/delegation.py +++ b/lib/crewai/src/crewai/a2a/utils/delegation.py @@ -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, diff --git a/lib/crewai/src/crewai/a2a/utils/task.py b/lib/crewai/src/crewai/a2a/utils/task.py index 91c80cc49..f97e2b231 100644 --- a/lib/crewai/src/crewai/a2a/utils/task.py +++ b/lib/crewai/src/crewai/a2a/utils/task.py @@ -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):