From bd9baca9765a5a6f2d62aa81381672609a04feae Mon Sep 17 00:00:00 2001 From: Solumath Date: Sat, 23 Mar 2024 14:11:06 +0100 Subject: [PATCH] fix missing typing --- cogs/autopin/cog.py | 2 +- cogs/bookmark/__init__.py | 4 +++- cogs/bookmark/cog.py | 2 +- cogs/contestvote/__init__.py | 4 +++- cogs/emoji/__init__.py | 4 +++- cogs/emoji/cog.py | 2 +- cogs/fitroom/cog.py | 2 +- cogs/forum/cog.py | 2 +- cogs/fun/cog.py | 2 +- cogs/gif/cog.py | 2 +- cogs/grillbotapi/cog.py | 2 +- cogs/hugs/cog.py | 2 +- cogs/info/cog.py | 2 +- cogs/latex/cog.py | 2 +- cogs/meme/cog.py | 2 +- cogs/message/cog.py | 2 +- cogs/moderation/cog.py | 2 +- cogs/nameday/cog.py | 2 +- cogs/random/cog.py | 2 +- cogs/reactions/cog.py | 2 +- cogs/streamlinks/cog.py | 2 +- cogs/studijni/cog.py | 2 +- cogs/week/cog.py | 2 +- 23 files changed, 29 insertions(+), 23 deletions(-) diff --git a/cogs/autopin/cog.py b/cogs/autopin/cog.py index c8bd06f04..3bd963c83 100644 --- a/cogs/autopin/cog.py +++ b/cogs/autopin/cog.py @@ -18,7 +18,7 @@ class AutoPin(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.warning_time = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta( minutes=self.config.autopin_warning_cooldown diff --git a/cogs/bookmark/__init__.py b/cogs/bookmark/__init__.py index f44593b58..8a4690138 100644 --- a/cogs/bookmark/__init__.py +++ b/cogs/bookmark/__init__.py @@ -1,5 +1,7 @@ +from disnake.ext.commands import Bot + from .cog import Bookmark -def setup(bot): +def setup(bot: Bot): bot.add_cog(Bookmark(bot)) diff --git a/cogs/bookmark/cog.py b/cogs/bookmark/cog.py index 623bdb3f8..f46605476 100644 --- a/cogs/bookmark/cog.py +++ b/cogs/bookmark/cog.py @@ -13,7 +13,7 @@ class Bookmark(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/contestvote/__init__.py b/cogs/contestvote/__init__.py index 08f6dab17..d3d3e5d20 100644 --- a/cogs/contestvote/__init__.py +++ b/cogs/contestvote/__init__.py @@ -1,5 +1,7 @@ +from disnake.ext.commands import Bot + from .cog import ContestVote -def setup(bot): +def setup(bot: Bot): bot.add_cog(ContestVote(bot)) diff --git a/cogs/emoji/__init__.py b/cogs/emoji/__init__.py index a5f34399b..1e5e6ee06 100644 --- a/cogs/emoji/__init__.py +++ b/cogs/emoji/__init__.py @@ -1,5 +1,7 @@ +from disnake.ext.commands import Bot + from .cog import Emoji -def setup(bot): +def setup(bot: Bot): bot.add_cog(Emoji(bot)) diff --git a/cogs/emoji/cog.py b/cogs/emoji/cog.py index 0c70201c0..89499af41 100644 --- a/cogs/emoji/cog.py +++ b/cogs/emoji/cog.py @@ -19,7 +19,7 @@ class Emoji(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): self.bot = bot self.check = room_check.RoomCheck(bot) self.tasks = [self.download_emojis_task.start()] diff --git a/cogs/fitroom/cog.py b/cogs/fitroom/cog.py index b616a0e2c..e03cf9cae 100644 --- a/cogs/fitroom/cog.py +++ b/cogs/fitroom/cog.py @@ -18,7 +18,7 @@ class FitRoom(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/forum/cog.py b/cogs/forum/cog.py index e9249b97c..9cf629c44 100644 --- a/cogs/forum/cog.py +++ b/cogs/forum/cog.py @@ -9,7 +9,7 @@ class Forum(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/fun/cog.py b/cogs/fun/cog.py index 23076b00b..8c3c6fb57 100644 --- a/cogs/fun/cog.py +++ b/cogs/fun/cog.py @@ -26,7 +26,7 @@ class Fun(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/gif/cog.py b/cogs/gif/cog.py index a80a26f7e..ecd0097c7 100644 --- a/cogs/gif/cog.py +++ b/cogs/gif/cog.py @@ -17,7 +17,7 @@ class Gif(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot self.imagehandler = ImageHandler() diff --git a/cogs/grillbotapi/cog.py b/cogs/grillbotapi/cog.py index e89c33a01..b520f4e75 100644 --- a/cogs/grillbotapi/cog.py +++ b/cogs/grillbotapi/cog.py @@ -14,7 +14,7 @@ class GrillbotApi(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot self._owner_id = bot.owner_id diff --git a/cogs/hugs/cog.py b/cogs/hugs/cog.py index 2f0345ede..65e35789d 100644 --- a/cogs/hugs/cog.py +++ b/cogs/hugs/cog.py @@ -31,7 +31,7 @@ class Hugs(Base, commands.Cog): emoji_count = len(Base.config.hug_emojis) - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot self.hugs_db = HugsTableDB() diff --git a/cogs/info/cog.py b/cogs/info/cog.py index 43ebeb458..eee5596e2 100644 --- a/cogs/info/cog.py +++ b/cogs/info/cog.py @@ -16,7 +16,7 @@ class Info(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/latex/cog.py b/cogs/latex/cog.py index 5c7e081f5..f3329a880 100644 --- a/cogs/latex/cog.py +++ b/cogs/latex/cog.py @@ -19,7 +19,7 @@ class Latex(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/meme/cog.py b/cogs/meme/cog.py index f37bb9c9b..d60861aff 100644 --- a/cogs/meme/cog.py +++ b/cogs/meme/cog.py @@ -13,7 +13,7 @@ class Meme(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/message/cog.py b/cogs/message/cog.py index 35a581490..46ba6aff3 100644 --- a/cogs/message/cog.py +++ b/cogs/message/cog.py @@ -14,7 +14,7 @@ class Message(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/moderation/cog.py b/cogs/moderation/cog.py index cf96055a5..fe9c83156 100644 --- a/cogs/moderation/cog.py +++ b/cogs/moderation/cog.py @@ -36,7 +36,7 @@ async def slowmode_delay_times(inter, string: str) -> list[str]: class Moderation(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot self.moderation_true = "moderation:resolve:true" diff --git a/cogs/nameday/cog.py b/cogs/nameday/cog.py index ebe9a1be7..fb1d5ec44 100644 --- a/cogs/nameday/cog.py +++ b/cogs/nameday/cog.py @@ -17,7 +17,7 @@ class Nameday(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot self.check = room_check.RoomCheck(bot) diff --git a/cogs/random/cog.py b/cogs/random/cog.py index 2b57f7363..79ecba487 100644 --- a/cogs/random/cog.py +++ b/cogs/random/cog.py @@ -16,7 +16,7 @@ class Random(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot self.check = room_check.RoomCheck(bot) diff --git a/cogs/reactions/cog.py b/cogs/reactions/cog.py index 04bad7bba..7ded35c03 100644 --- a/cogs/reactions/cog.py +++ b/cogs/reactions/cog.py @@ -13,7 +13,7 @@ class Reactions(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/streamlinks/cog.py b/cogs/streamlinks/cog.py index 4bdb78487..f09ee56ef 100644 --- a/cogs/streamlinks/cog.py +++ b/cogs/streamlinks/cog.py @@ -41,7 +41,7 @@ async def autocomp_subjects_with_stream(inter: disnake.ApplicationCommandInterac class StreamLinks(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): global subjects, subjects_with_stream super().__init__() self.bot = bot diff --git a/cogs/studijni/cog.py b/cogs/studijni/cog.py index b613420fb..cf6cc08dc 100644 --- a/cogs/studijni/cog.py +++ b/cogs/studijni/cog.py @@ -14,7 +14,7 @@ class Studijni(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot diff --git a/cogs/week/cog.py b/cogs/week/cog.py index 6006caae9..ad7be4d61 100644 --- a/cogs/week/cog.py +++ b/cogs/week/cog.py @@ -15,7 +15,7 @@ class Week(Base, commands.Cog): - def __init__(self, bot): + def __init__(self, bot: commands.Bot): super().__init__() self.bot = bot