From d52c80aa8b7efc04a4731811197a543b17a03c04 Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Sat, 8 Jul 2023 01:06:25 +0200 Subject: [PATCH] Linting --- database/utils/caches.py | 2 +- didier/cogs/discord.py | 2 +- didier/cogs/help.py | 2 +- didier/didier.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database/utils/caches.py b/database/utils/caches.py index 248eb5f..2df9dac 100644 --- a/database/utils/caches.py +++ b/database/utils/caches.py @@ -69,7 +69,7 @@ class LinkCache(DatabaseCache): self.clear() all_links = await links.get_all_links(database_session) - self.data = list(map(lambda l: l.name, all_links)) + self.data = list(map(lambda link: link.name, all_links)) self.data.sort() self.data_transformed = list(map(str.lower, self.data)) diff --git a/didier/cogs/discord.py b/didier/cogs/discord.py index 4d9b423..eaf0179 100644 --- a/didier/cogs/discord.py +++ b/didier/cogs/discord.py @@ -420,7 +420,7 @@ class Discord(commands.Cog): if ctx.guild is None: return await ctx.reply("Snipe only works in servers.", mention_author=False, ephemeral=True) - sniped_data = self.client.sniped.get(ctx.channel.id, None) + sniped_data = self.client.sniped.get(ctx.channel.id) if sniped_data is None: return await ctx.reply( "There's no one to make fun of in this channel.", mention_author=False, ephemeral=True diff --git a/didier/cogs/help.py b/didier/cogs/help.py index 459f802..ddb568d 100644 --- a/didier/cogs/help.py +++ b/didier/cogs/help.py @@ -225,7 +225,7 @@ class CustomHelpCommand(commands.MinimalHelpCommand): def _get_flags_class(self, command: commands.Command) -> Optional[Type[PosixFlags]]: """Check if a command has flags""" - flag_param = command.params.get("flags", None) + flag_param = command.params.get("flags") if flag_param is None: return None diff --git a/didier/didier.py b/didier/didier.py index cf9ed1d..97bb40c 100644 --- a/didier/didier.py +++ b/didier/didier.py @@ -374,7 +374,7 @@ class Didier(commands.Bot): # If the edited message is currently present in the snipe cache, # don't update the , but instead change the - existing = self.sniped.get(before.channel.id, None) + existing = self.sniped.get(before.channel.id) if existing is not None and existing[0].id == before.id: before = existing[0]