Skip to content

Commit 25e2100

Browse files
committed
fix(ci): resolve linter errors SIM105 and PYI034/ANN204
1 parent a13055f commit 25e2100

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/a2a/server/request_handlers/default_request_handler.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33

44
from collections.abc import AsyncGenerator
5+
from contextlib import suppress
56
from typing import cast
67

78
from a2a.server.agent_execution import (
@@ -447,10 +448,8 @@ async def _cleanup_producer(
447448
"""Cleans up the agent execution task and queue manager entry."""
448449
if cancel:
449450
producer_task.cancel()
450-
try:
451+
with suppress(asyncio.CancelledError):
451452
await producer_task
452-
except asyncio.CancelledError:
453-
pass
454453
await self._queue_manager.close(task_id)
455454
async with self._running_agents_lock:
456455
self._running_agents.pop(task_id, None)

src/a2a/utils/telemetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class _NoOp:
8686
def __call__(self, *args: Any, **kwargs: Any) -> Any:
8787
return self
8888

89-
def __enter__(self) -> '_NoOp':
89+
def __enter__(self) -> Any:
9090
return self
9191

9292
def __exit__(self, *args: object, **kwargs: Any) -> None:

0 commit comments

Comments
 (0)