Skip to content

Commit deeb62d

Browse files
authored
chore(format): run nox -s format (#247)
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](https://github.com/a2aproject/a2a-python/blob/main/CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests and linter pass (Run `nox -s format` from the repository root to format) - [x] Appropriate docs were updated (if necessary) Fixes N/A 🦕 This PR runs `nox -s format` to fix previously missed formatting issues. Signed-off-by: Shingo OKAWA <shingo.okawa.g.h.c@gmail.com>
1 parent 91539d6 commit deeb62d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

tests/server/tasks/test_task_manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,16 @@ async def test_save_task_event_artifact_update(
127127
updated_task.artifacts = [new_artifact]
128128
mock_task_store.save.assert_called_once_with(updated_task)
129129

130+
130131
@pytest.mark.asyncio
131132
async def test_save_task_event_metadata_update(
132133
task_manager: TaskManager, mock_task_store: AsyncMock
133134
) -> None:
134135
"""Test saving an updated metadata for an existing task."""
135136
initial_task = Task(**MINIMAL_TASK)
136137
mock_task_store.get.return_value = initial_task
137-
new_metadata = {"meta_key_test": "meta_value_test"}
138-
138+
new_metadata = {'meta_key_test': 'meta_value_test'}
139+
139140
event = TaskStatusUpdateEvent(
140141
taskId=MINIMAL_TASK['id'],
141142
contextId=MINIMAL_TASK['contextId'],

tests/server/tasks/test_task_updater.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,9 @@ async def test_add_artifact_generates_id(
150150
assert event.lastChunk == None
151151

152152

153-
154153
@pytest.mark.asyncio
155154
@pytest.mark.parametrize(
156-
"append_val, last_chunk_val",
155+
'append_val, last_chunk_val',
157156
[
158157
(False, False),
159158
(True, True),
@@ -166,14 +165,17 @@ async def test_add_artifact_with_append_last_chunk(
166165
):
167166
"""Test add_artifact with append and last_chunk flags."""
168167
await task_updater.add_artifact(
169-
parts=sample_parts, artifact_id="id1", append=append_val, last_chunk=last_chunk_val
168+
parts=sample_parts,
169+
artifact_id='id1',
170+
append=append_val,
171+
last_chunk=last_chunk_val,
170172
)
171173

172174
event_queue.enqueue_event.assert_called_once()
173175
event = event_queue.enqueue_event.call_args[0][0]
174176

175177
assert isinstance(event, TaskArtifactUpdateEvent)
176-
assert event.artifact.artifactId == "id1"
178+
assert event.artifact.artifactId == 'id1'
177179
assert event.artifact.parts == sample_parts
178180
assert event.append == append_val
179181
assert event.lastChunk == last_chunk_val

0 commit comments

Comments
 (0)