Skip to content

Commit 73e6d19

Browse files
committed
fix linting errors
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
1 parent bdd73aa commit 73e6d19

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

tests/integration/endpoints/test_stream_interrupt_integration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ async def test_stream_interrupt_full_round_trip(
3434
"""Full lifecycle: register, interrupt, then verify deregistration."""
3535
# test_config loads configuration so @authorize on the handler can resolve.
3636
_ = test_config
37+
3738
async def pending_stream() -> None:
3839
await asyncio.sleep(10)
3940

tests/unit/pydantic_ai_lightspeed/llamastack/test_transport.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# pylint: disable=protected-access
44

55
import json
6+
from collections.abc import AsyncGenerator
67
from typing import Any
78

89
import httpx
@@ -45,7 +46,7 @@ class TestAsyncByteStream:
4546
async def test_iterates_chunks(self) -> None:
4647
"""Test that _AsyncByteStream yields all chunks from the wrapped generator."""
4748

48-
async def gen():
49+
async def gen() -> AsyncGenerator[bytes, None]:
4950
yield b"chunk1"
5051
yield b"chunk2"
5152
yield b"chunk3"
@@ -59,7 +60,7 @@ async def gen():
5960
async def test_empty_generator(self) -> None:
6061
"""Test that _AsyncByteStream handles an empty generator gracefully."""
6162

62-
async def gen():
63+
async def gen() -> AsyncGenerator[bytes, None]:
6364
return
6465
yield # pragma: no cover
6566

@@ -134,7 +135,7 @@ async def test_streaming_request(
134135
content=json.dumps(body).encode("utf-8"),
135136
)
136137

137-
async def mock_stream_result():
138+
async def mock_stream_result() -> AsyncGenerator[dict[str, int], None]:
138139
yield {"chunk": 1}
139140
yield {"chunk": 2}
140141

@@ -317,7 +318,7 @@ async def test_produces_sse_format(
317318
) -> None:
318319
"""Test that streaming responses produce SSE-formatted byte chunks."""
319320

320-
async def mock_stream():
321+
async def mock_stream() -> AsyncGenerator[dict[str, str], None]:
321322
yield {"delta": "hello"}
322323
yield {"delta": "world"}
323324

0 commit comments

Comments
 (0)