Skip to content

Commit 6c06780

Browse files
committed
Fixes after merge
1 parent c9a5166 commit 6c06780

6 files changed

Lines changed: 12 additions & 10 deletions

File tree

.github/workflows/linter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
"${{ steps.ruff-format.outcome }}" == "failure" || \
6464
"${{ steps.mypy.outcome }}" == "failure" || \
6565
"${{ steps.pyright.outcome }}" == "failure"]]; then
66-
# Disable due to not to block on "PR too large error"
66+
# Disable to not to block on "PR too large error"
6767
# "${{ steps.jscpd.outcome }}" == "failure" ]]; then
6868
echo "One or more linting/checking steps failed."
6969
exit 1

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
3737
strategy:
3838
matrix:
39-
python-version: ["3.10", "3.13"]
39+
python-version: ['3.10', '3.13']
4040
steps:
4141
- name: Checkout code
4242
uses: actions/checkout@v6
@@ -57,6 +57,6 @@ jobs:
5757
- name: Install dependencies
5858
run: uv sync --locked
5959
- name: Run tests and check coverage
60-
run: uv run pytest --cov=a2a --cov-report term --cov-fail-under=85
60+
run: uv run pytest --cov=a2a --cov-report term --cov-fail-under=88
6161
- name: Show coverage summary in log
6262
run: uv run coverage report

.github/workflows/update-a2a-types.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v6
1919
with:
20-
python-version: "3.10"
20+
python-version: '3.10'
2121
- name: Install uv
2222
uses: astral-sh/setup-uv@v7
2323
- name: Configure uv shell
@@ -41,8 +41,8 @@ jobs:
4141
token: ${{ secrets.A2A_BOT_PAT }}
4242
committer: a2a-bot <a2a-bot@google.com>
4343
author: a2a-bot <a2a-bot@google.com>
44-
commit-message: "${{ github.event.client_payload.message }}"
45-
title: "${{ github.event.client_payload.message }}"
44+
commit-message: '${{ github.event.client_payload.message }}'
45+
title: '${{ github.event.client_payload.message }}'
4646
body: |
4747
Commit: https://github.com/a2aproject/A2A/commit/${{ github.event.client_payload.sha }}
4848
branch: auto-update-a2a-types-${{ github.event.client_payload.sha }}

src/a2a/client/transports/jsonrpc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ async def send_message_streaming(
176176
try:
177177
event_source.response.raise_for_status()
178178
async for sse in event_source.aiter_sse():
179+
if not sse.data:
180+
continue
179181
json_rpc_response = JSONRPC20Response.from_json(sse.data)
180182
if json_rpc_response.error:
181183
raise A2AClientJSONRPCError(json_rpc_response.error)

src/a2a/client/transports/rest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ async def subscribe(
383383
) as event_source:
384384
try:
385385
async for sse in event_source.aiter_sse():
386+
if not sse.data:
387+
continue
386388
event: StreamResponse = Parse(sse.data, StreamResponse())
387389
yield event
388390
except SSEError as e:

tests/client/test_errors.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,9 @@ class TestA2AClientJSONRPCErrorRepr:
170170

171171
def test_repr(self) -> None:
172172
"""Test that __repr__ shows the JSON-RPC error object."""
173-
response = JSONRPC20Response(
174-
_id='test-1',
175-
error={'code': -32601, 'message': 'Method not found', 'data': None},
173+
error = A2AClientJSONRPCError(
174+
{'code': -32601, 'message': 'Method not found', 'data': None}
176175
)
177-
error = A2AClientJSONRPCError(response.error)
178176
assert (
179177
repr(error)
180178
== "A2AClientJSONRPCError(\"JSON-RPC Error {'code': -32601, 'message': 'Method not found', 'data': None}\")"

0 commit comments

Comments
 (0)