Skip to content

Commit 1aa4dd7

Browse files
authored
ci: Silence New Lint errors (#400)
1 parent d7dd6ee commit 1aa4dd7

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ignore = [
3232
"TRY003",
3333
"G004",
3434
"TRY201",
35+
"FIX002",
3536
]
3637

3738
select = [

src/a2a/server/request_handlers/default_request_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ async def on_message_send(
293293
consumer, blocking=blocking
294294
)
295295
if not result:
296-
raise ServerError(error=InternalError())
296+
raise ServerError(error=InternalError()) # noqa: TRY301
297297

298298
if isinstance(result, Task):
299299
self._validate_task_id_match(task_id, result.id)

src/a2a/server/request_handlers/jsonrpc_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ async def on_cancel_task(
187187
CancelTaskSuccessResponse,
188188
CancelTaskResponse,
189189
)
190-
raise ServerError(error=TaskNotFoundError())
190+
raise ServerError(error=TaskNotFoundError()) # noqa: TRY301
191191
except ServerError as e:
192192
return CancelTaskResponse(
193193
root=JSONRPCErrorResponse(
@@ -339,7 +339,7 @@ async def on_get_task(
339339
GetTaskSuccessResponse,
340340
GetTaskResponse,
341341
)
342-
raise ServerError(error=TaskNotFoundError())
342+
raise ServerError(error=TaskNotFoundError()) # noqa: TRY301
343343
except ServerError as e:
344344
return GetTaskResponse(
345345
root=JSONRPCErrorResponse(

src/a2a/server/tasks/database_push_notification_config_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ async def get_info(self, task_id: str) -> list[PushNotificationConfig]:
252252
for model in models:
253253
try:
254254
configs.append(self._from_orm(model))
255-
except ValueError:
255+
except ValueError: # noqa: PERF203
256256
logger.exception(
257257
'Could not deserialize push notification config for task %s, config %s',
258258
model.task_id,

0 commit comments

Comments
 (0)