mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Update Pyright to v1.1.394
This commit is contained in:
@ -540,7 +540,7 @@ class ConnectionState(Generic[ClientT]):
|
||||
) -> Tuple[Union[Channel, Thread], Optional[Guild]]:
|
||||
channel_id = int(data['channel_id'])
|
||||
try:
|
||||
guild_id = guild_id or int(data['guild_id'])
|
||||
guild_id = guild_id or int(data['guild_id']) # pyright: ignore[reportTypedDictNotRequiredAccess]
|
||||
guild = self._get_guild(guild_id)
|
||||
except KeyError:
|
||||
channel = DMChannel._from_message(self, channel_id)
|
||||
@ -736,7 +736,7 @@ class ConnectionState(Generic[ClientT]):
|
||||
|
||||
if 'components' in data:
|
||||
try:
|
||||
entity_id = int(data['interaction']['id'])
|
||||
entity_id = int(data['interaction']['id']) # pyright: ignore[reportTypedDictNotRequiredAccess]
|
||||
except (KeyError, ValueError):
|
||||
entity_id = raw.message_id
|
||||
|
||||
@ -935,7 +935,7 @@ class ConnectionState(Generic[ClientT]):
|
||||
def parse_channel_pins_update(self, data: gw.ChannelPinsUpdateEvent) -> None:
|
||||
channel_id = int(data['channel_id'])
|
||||
try:
|
||||
guild = self._get_guild(int(data['guild_id']))
|
||||
guild = self._get_guild(int(data['guild_id'])) # pyright: ignore[reportTypedDictNotRequiredAccess]
|
||||
except KeyError:
|
||||
guild = None
|
||||
channel = self._get_private_channel(channel_id)
|
||||
@ -1017,7 +1017,7 @@ class ConnectionState(Generic[ClientT]):
|
||||
return
|
||||
|
||||
try:
|
||||
channel_ids = {int(i) for i in data['channel_ids']}
|
||||
channel_ids = {int(i) for i in data['channel_ids']} # pyright: ignore[reportTypedDictNotRequiredAccess]
|
||||
except KeyError:
|
||||
# If not provided, then the entire guild is being synced
|
||||
# So all previous thread data should be overwritten
|
||||
|
Reference in New Issue
Block a user