Skip to content

Commit

Permalink
Fix invalid type hinting of initial_channels in WS Connection (Python…
Browse files Browse the repository at this point in the history
  • Loading branch information
junah201 committed Jul 3, 2024
1 parent 8e91cec commit a0c0193
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion twitchio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(
token: str,
*,
client_secret: str = None,
initial_channels: Union[list, tuple, Callable] = None,
initial_channels: Union[List[str], Tuple[str, ...], Callable[[], Union[List[str], Tuple[str, ...]]], None] = None,
loop: asyncio.AbstractEventLoop = None,
heartbeat: Optional[float] = 30.0,
retain_cache: Optional[bool] = True,
Expand Down
4 changes: 2 additions & 2 deletions twitchio/ext/commands/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import types
import warnings
from functools import partial
from typing import Callable, Optional, Union, Coroutine, Dict, List, TYPE_CHECKING, Mapping, Awaitable
from typing import Callable, Optional, Union, Coroutine, Dict, List, Tuple, TYPE_CHECKING, Mapping, Awaitable

from twitchio.client import Client
from twitchio.http import TwitchHTTP
Expand All @@ -53,7 +53,7 @@ def __init__(
*,
prefix: Union[str, list, tuple, set, Callable, Coroutine],
client_secret: str = None,
initial_channels: Union[list, tuple, Callable] = None,
initial_channels: Union[List[str], Tuple[str, ...], Callable[[], Union[List[str], Tuple[str, ...]]], None] = None,
heartbeat: Optional[float] = 30.0,
retain_cache: Optional[bool] = True,
**kwargs,
Expand Down
4 changes: 2 additions & 2 deletions twitchio/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import time
import traceback
from functools import partial
from typing import Union, Optional, List, TYPE_CHECKING
from typing import Union, Callable, Optional, List, Tuple, TYPE_CHECKING

import aiohttp

Expand All @@ -57,7 +57,7 @@ def __init__(
client: "Client",
token: str = None,
modes: tuple = None,
initial_channels: List[str] = None,
initial_channels: Union[List[str], Tuple[str, ...], Callable[[], Union[List[str], Tuple[str, ...]]], None] = None,
retain_cache: Optional[bool] = True,
):
self._loop = loop
Expand Down

0 comments on commit a0c0193

Please sign in to comment.