mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Use Unpack where it's possible
This commit is contained in:
@ -52,6 +52,12 @@ if TYPE_CHECKING:
|
||||
from .activity import BaseActivity
|
||||
from .flags import Intents
|
||||
from .types.gateway import SessionStartLimit
|
||||
from .client import _ClientOptions
|
||||
|
||||
class _AutoShardedClientOptions(_ClientOptions, total=False):
|
||||
shard_ids: List[int]
|
||||
shard_connect_timeout: Optional[float]
|
||||
|
||||
|
||||
__all__ = (
|
||||
'AutoShardedClient',
|
||||
@ -365,7 +371,7 @@ class AutoShardedClient(Client):
|
||||
if TYPE_CHECKING:
|
||||
_connection: AutoShardedConnectionState
|
||||
|
||||
def __init__(self, *args: Any, intents: Intents, **kwargs: Any) -> None:
|
||||
def __init__(self, *args: Any, intents: Intents, **kwargs: Unpack[_AutoShardedClientOptions]) -> None:
|
||||
kwargs.pop('shard_id', None)
|
||||
self.shard_ids: Optional[List[int]] = kwargs.pop('shard_ids', None)
|
||||
self.shard_connect_timeout: Optional[float] = kwargs.pop('shard_connect_timeout', 180.0)
|
||||
|
Reference in New Issue
Block a user