Skip to content

Commit 4c0ace8

Browse files
committed
chore: Formatting
1 parent efd9080 commit 4c0ace8

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/a2a/server/events/event_queue.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ class EventQueue:
2929
to create child queues that receive the same events.
3030
"""
3131

32-
def __init__(self, max_queue_size=DEFAULT_MAX_QUEUE_SIZE) -> None:
32+
def __init__(self, max_queue_size: int = DEFAULT_MAX_QUEUE_SIZE) -> None:
3333
"""Initializes the EventQueue."""
34-
3534
# Make sure the `asyncio.Queue` is bounded.
3635
# If it's unbounded (maxsize=0), then `queue.put()` never needs to wait,
3736
# and so the streaming won't work correctly.

src/a2a/server/tasks/task_updater.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ async def failed(self, message: Message | None = None):
109109

110110
async def reject(self, message: Message | None = None):
111111
"""Marks the task as rejected and publishes a final status update."""
112-
await self.update_status(TaskState.rejected, message=message, final=True)
112+
await self.update_status(
113+
TaskState.rejected, message=message, final=True
114+
)
113115

114116
async def submit(self, message: Message | None = None):
115117
"""Marks the task as submitted and publishes a status update."""

tests/server/tasks/test_task_updater.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ async def test_complete_without_message(task_updater, event_queue):
146146

147147

148148
@pytest.mark.asyncio
149-
async def test_complete_with_message(
150-
task_updater, event_queue, sample_message
151-
):
149+
async def test_complete_with_message(task_updater, event_queue, sample_message):
152150
"""Test marking a task as completed with a message."""
153151
await task_updater.complete(message=sample_message)
154152

@@ -176,9 +174,7 @@ async def test_submit_without_message(task_updater, event_queue):
176174

177175

178176
@pytest.mark.asyncio
179-
async def test_submit_with_message(
180-
task_updater, event_queue, sample_message
181-
):
177+
async def test_submit_with_message(task_updater, event_queue, sample_message):
182178
"""Test marking a task as submitted with a message."""
183179
await task_updater.submit(message=sample_message)
184180

0 commit comments

Comments
 (0)