From 834e23dc003d950196d085eb92a81f36e43b067f Mon Sep 17 00:00:00 2001 From: Steve C Date: Wed, 21 Jul 2021 02:44:27 -0400 Subject: [PATCH] Fix type annotations for purge's limit param on Thread/TextChannel Optional was missing. --- discord/channel.py | 2 +- discord/threads.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/channel.py b/discord/channel.py index 18c26fdf7..f24653920 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -372,7 +372,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): async def purge( self, *, - limit: int = 100, + limit: Optional[int] = 100, check: Callable[[Message], bool] = MISSING, before: Optional[SnowflakeTime] = None, after: Optional[SnowflakeTime] = None, diff --git a/discord/threads.py b/discord/threads.py index daf7e5180..d1a89d83f 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -366,7 +366,7 @@ class Thread(Messageable, Hashable): async def purge( self, *, - limit: int = 100, + limit: Optional[int] = 100, check: Callable[[Message], bool] = MISSING, before: Optional[SnowflakeTime] = None, after: Optional[SnowflakeTime] = None,