Skip to content

Commit 8fad118

Browse files
author
Christian-Sidak
committed
fix: use list.extend with async comprehension to satisfy ruff PERF401
1 parent dd1ee3d commit 8fad118

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎tests/client/test_stdio.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,7 @@ async def test_stdio_client_invalid_utf8():
528528

529529
with anyio.fail_after(5.0):
530530
async with stdio_client(server_params) as (read_stream, _write_stream):
531-
async for item in read_stream:
532-
items.append(item)
531+
items.extend([item async for item in read_stream])
533532

534533
assert len(items) == 2
535534
assert isinstance(items[0], Exception)

0 commit comments

Comments
 (0)