mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Update comments after # type: ignore to be compatible with PEP 484
This commit is contained in:
1 parent
0bcb0d0e3c
commit
5ffa3e85de
25 files changed
+68
-68
No files matched your search
@@ -375,7 +375,7 @@ class PartialMessageConverter(Converter[discord.PartialMessage]):
|
||||
guild_id, message_id, channel_id = self._get_id_matches(ctx, argument)
|
||||
channel = self._resolve_channel(ctx, guild_id, channel_id)
|
||||
if not channel or not isinstance(channel, discord.abc.Messageable):
|
||||
raise ChannelNotFound(channel_id) # type: ignore - channel_id won't be None here
|
||||
raise ChannelNotFound(channel_id) # type: ignore # channel_id won't be None here
|
||||
return discord.PartialMessage(channel=channel, id=message_id)
|
||||
|
||||
|
||||
@@ -407,7 +407,7 @@ class MessageConverter(IDConverter[discord.Message]):
|
||||
except discord.NotFound:
|
||||
raise MessageNotFound(argument)
|
||||
except discord.Forbidden:
|
||||
raise ChannelNotReadable(channel) # type: ignore - type-checker thinks channel could be a DMChannel at this point
|
||||
raise ChannelNotReadable(channel) # type: ignore # type-checker thinks channel could be a DMChannel at this point
|
||||
|
||||
|
||||
class GuildChannelConverter(IDConverter[discord.abc.GuildChannel]):
|
||||
|
||||
Reference in new issue
Block a user