Add type: ignore for pre-existing protobuf stub issues

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2026-04-24 16:24:51 +00:00
parent 856954a311
commit 6b0ddfa3f2
4 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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,

View File

@@ -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):