Skip to content

Commit e32aca1

Browse files
committed
Change list[T] to Collection in multi_sub
1 parent fcbb2bd commit e32aca1

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

twitchio/client.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
if TYPE_CHECKING:
5454
import datetime
55-
from collections.abc import Awaitable, Callable, Coroutine
55+
from collections.abc import Awaitable, Callable, Collection, Coroutine
5656

5757
import aiohttp
5858

@@ -3496,7 +3496,9 @@ def conduit_info(self) -> ConduitInfo:
34963496
"""
34973497
return self._conduit_info
34983498

3499-
async def _multi_sub(self, subscriptions: list[SubscriptionPayload], *, stop_on_error: bool) -> MultiSubscribePayload:
3499+
async def _multi_sub(
3500+
self, subscriptions: Collection[SubscriptionPayload], *, stop_on_error: bool
3501+
) -> MultiSubscribePayload:
35003502
assert self._conduit_info.conduit
35013503

35023504
conduit = self._conduit_info.conduit
@@ -3535,16 +3537,20 @@ async def _multi_sub(self, subscriptions: list[SubscriptionPayload], *, stop_on_
35353537

35363538
@overload
35373539
async def multi_subscribe(
3538-
self, subscriptions: list[SubscriptionPayload], *, wait: Literal[True] = True, stop_on_error: bool = False
3540+
self, subscriptions: Collection[SubscriptionPayload], *, wait: Literal[True] = True, stop_on_error: bool = False
35393541
) -> MultiSubscribePayload: ...
35403542

35413543
@overload
35423544
async def multi_subscribe(
3543-
self, subscriptions: list[SubscriptionPayload], *, wait: Literal[False] = False, stop_on_error: bool = False
3545+
self, subscriptions: Collection[SubscriptionPayload], *, wait: Literal[False] = False, stop_on_error: bool = False
35443546
) -> asyncio.Task[MultiSubscribePayload]: ...
35453547

35463548
async def multi_subscribe(
3547-
self, subscriptions: list[SubscriptionPayload], *, wait: bool = True, stop_on_error: bool = False
3549+
self,
3550+
subscriptions: Collection[SubscriptionPayload],
3551+
*,
3552+
wait: bool = True,
3553+
stop_on_error: bool = False,
35483554
) -> MultiSubscribePayload | asyncio.Task[MultiSubscribePayload]:
35493555
"""|coro|
35503556

0 commit comments

Comments
 (0)