From dd6b55c47be4d7dd85a5b0b40c8bcd5c0a5574d1 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Tue, 12 Aug 2025 20:58:54 +0100 Subject: [PATCH] ci: Silence Lint errors --- .ruff.toml | 1 + src/a2a/server/request_handlers/default_request_handler.py | 2 +- src/a2a/server/request_handlers/jsonrpc_handler.py | 4 ++-- .../server/tasks/database_push_notification_config_store.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.ruff.toml b/.ruff.toml index 606e32dcb..44e034549 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -32,6 +32,7 @@ ignore = [ "TRY003", "G004", "TRY201", + "FIX002", ] select = [ diff --git a/src/a2a/server/request_handlers/default_request_handler.py b/src/a2a/server/request_handlers/default_request_handler.py index 3c0746d25..25fe25258 100644 --- a/src/a2a/server/request_handlers/default_request_handler.py +++ b/src/a2a/server/request_handlers/default_request_handler.py @@ -293,7 +293,7 @@ async def on_message_send( consumer, blocking=blocking ) if not result: - raise ServerError(error=InternalError()) + raise ServerError(error=InternalError()) # noqa: TRY301 if isinstance(result, Task): self._validate_task_id_match(task_id, result.id) diff --git a/src/a2a/server/request_handlers/jsonrpc_handler.py b/src/a2a/server/request_handlers/jsonrpc_handler.py index 97cff4960..3beb4e4f6 100644 --- a/src/a2a/server/request_handlers/jsonrpc_handler.py +++ b/src/a2a/server/request_handlers/jsonrpc_handler.py @@ -187,7 +187,7 @@ async def on_cancel_task( CancelTaskSuccessResponse, CancelTaskResponse, ) - raise ServerError(error=TaskNotFoundError()) + raise ServerError(error=TaskNotFoundError()) # noqa: TRY301 except ServerError as e: return CancelTaskResponse( root=JSONRPCErrorResponse( @@ -339,7 +339,7 @@ async def on_get_task( GetTaskSuccessResponse, GetTaskResponse, ) - raise ServerError(error=TaskNotFoundError()) + raise ServerError(error=TaskNotFoundError()) # noqa: TRY301 except ServerError as e: return GetTaskResponse( root=JSONRPCErrorResponse( diff --git a/src/a2a/server/tasks/database_push_notification_config_store.py b/src/a2a/server/tasks/database_push_notification_config_store.py index fb541498b..f4a05e6ee 100644 --- a/src/a2a/server/tasks/database_push_notification_config_store.py +++ b/src/a2a/server/tasks/database_push_notification_config_store.py @@ -252,7 +252,7 @@ async def get_info(self, task_id: str) -> list[PushNotificationConfig]: for model in models: try: configs.append(self._from_orm(model)) - except ValueError: + except ValueError: # noqa: PERF203 logger.exception( 'Could not deserialize push notification config for task %s, config %s', model.task_id,