aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStocker <[email protected]>2021-08-23 05:22:36 -0400
committerGitHub <[email protected]>2021-08-23 05:22:36 -0400
commitcdf46127ae2e1a183e5c94d9eb970bbccbed64af (patch)
tree4cd972134eb6897bf611f5c1a4945cd9fa28ec40
parentFix permissions.py typing (diff)
downloaddiscord.py-cdf46127ae2e1a183e5c94d9eb970bbccbed64af.tar.xz
discord.py-cdf46127ae2e1a183e5c94d9eb970bbccbed64af.zip
Added type: ignores where needed to activity.py
-rw-r--r--discord/activity.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/discord/activity.py b/discord/activity.py
index 3f89c477..51205377 100644
--- a/discord/activity.py
+++ b/discord/activity.py
@@ -830,10 +830,12 @@ def create_activity(data: Optional[ActivityPayload]) -> Optional[ActivityTypes]:
except KeyError:
return Activity(**data)
else:
- return CustomActivity(name=name, **data)
+ # we removed the name key from data already
+ return CustomActivity(name=name, **data) # type: ignore
elif game_type is ActivityType.streaming:
if 'url' in data:
- return Streaming(**data)
+ # the url won't be None here
+ return Streaming(**data) # type: ignore
return Activity(**data)
elif game_type is ActivityType.listening and 'sync_id' in data and 'session_id' in data:
return Spotify(**data)