mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-03 14:02:19 +00:00
Update comments after # type: ignore to be compatible with PEP 484
This commit is contained in:
@@ -143,7 +143,7 @@ class Interaction:
|
||||
def __init__(self, *, data: InteractionPayload, state: ConnectionState):
|
||||
self._state: ConnectionState = state
|
||||
self._client: Client = state._get_client()
|
||||
self._session: ClientSession = state.http._HTTPClient__session # type: ignore - Mangled attribute for __session
|
||||
self._session: ClientSession = state.http._HTTPClient__session # type: ignore # Mangled attribute for __session
|
||||
self._original_message: Optional[InteractionMessage] = None
|
||||
self._from_data(data)
|
||||
|
||||
@@ -178,7 +178,7 @@ class Interaction:
|
||||
if self.guild_id:
|
||||
guild = self.guild or Object(id=self.guild_id)
|
||||
try:
|
||||
member = data['member'] # type: ignore - The key is optional and handled
|
||||
member = data['member'] # type: ignore # The key is optional and handled
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
@@ -187,7 +187,7 @@ class Interaction:
|
||||
self._permissions = self.user._permissions or 0
|
||||
else:
|
||||
try:
|
||||
self.user = User(state=self._state, data=data['user']) # type: ignore - The key is optional and handled
|
||||
self.user = User(state=self._state, data=data['user']) # type: ignore # The key is optional and handled
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user