Skip to content

Commit d59bf5c

Browse files
committed
fix(test): narrow type with isinstance to satisfy pyright
The test accesses DirectDispatcher internals (_in_flight_ids, _next_id) but direct_pair() returns the Dispatcher protocol. Add an isinstance assertion so pyright can see the concrete type.
1 parent 4bcd430 commit d59bf5c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/shared/test_dispatcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ async def noop(
493493
return {}
494494

495495
client, server, close = direct_pair()
496+
assert isinstance(server, DirectDispatcher)
496497
try:
497498
async with anyio.create_task_group() as tg:
498499
await tg.start(client.run, noop, noop)

0 commit comments

Comments
 (0)