From 341e7e61c968e59e16b45b9088348c3e1ebf7cb0 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Sun, 17 May 2020 23:44:15 +0300 Subject: [PATCH] Fix black linting fuckups --- cogs/admin.py | 4 +--- cogs/common.py | 6 +++--- cogs/err.py | 2 +- cogs/meme.py | 14 +++++--------- cogs/mod_timed.py | 6 ++---- cogs/remind.py | 2 +- cogs/robocronp.py | 4 ++-- 7 files changed, 15 insertions(+), 23 deletions(-) diff --git a/cogs/admin.py b/cogs/admin.py index cd7603d..554b462 100644 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -110,9 +110,7 @@ class Admin(Cog): self.bot.unload_extension("cogs." + cog) self.bot.load_extension("cogs." + cog) self.bot.log.info(f"Reloaded ext {cog}") - await ctx.send( - f":white_check_mark: `{cog}` " "successfully reloaded." - ) + await ctx.send(f":white_check_mark: `{cog}` successfully reloaded.") await self.cog_load_actions(cog) except: await ctx.send( diff --git a/cogs/common.py b/cogs/common.py index 364c3c4..af9d094 100644 --- a/cogs/common.py +++ b/cogs/common.py @@ -79,7 +79,7 @@ class Common(Cog): self.bot.log.info(f"Data from {url}: {text_data}") return text_data else: - self.bot.log.error(f"HTTP Error {data.status} " "while getting {url}") + self.bot.log.error(f"HTTP Error {data.status} while getting {url}") except: self.bot.log.error( f"Error while getting {url} " @@ -94,7 +94,7 @@ class Common(Cog): self.bot.log.debug(f"Data from {url}: {byte_data}") return byte_data else: - self.bot.log.error(f"HTTP Error {data.status} " "while getting {url}") + self.bot.log.error(f"HTTP Error {data.status} while getting {url}") except: self.bot.log.error( f"Error while getting {url} " @@ -110,7 +110,7 @@ class Common(Cog): content_type = data.headers["Content-Type"] return await data.json(content_type=content_type) else: - self.bot.log.error(f"HTTP Error {data.status} " "while getting {url}") + self.bot.log.error(f"HTTP Error {data.status} while getting {url}") except: self.bot.log.error( f"Error while getting {url} " diff --git a/cogs/err.py b/cogs/err.py index 44c7f98..a6c3bbe 100644 --- a/cogs/err.py +++ b/cogs/err.py @@ -176,7 +176,7 @@ class Err(Cog): await ctx.send(hex(errcode)) else: await ctx.send( - "This doesn't follow the typical" " Nintendo Switch 2XXX-XXXX format!" + "This doesn't follow the typical Nintendo Switch 2XXX-XXXX format!" ) @commands.command(aliases=["h2e"]) diff --git a/cogs/meme.py b/cogs/meme.py index 9037f19..2646d62 100644 --- a/cogs/meme.py +++ b/cogs/meme.py @@ -67,7 +67,7 @@ class Meme(Cog): description=f"Here's your ReSwitched Silver™," f"{user.mention}!", ) embed.set_image( - url="https://cdn.discordapp.com/emojis/" "548623626916724747.png?v=1" + url="https://cdn.discordapp.com/emojis/548623626916724747.png?v=1" ) await ctx.send(embed=embed) @@ -113,16 +113,12 @@ class Meme(Cog): @commands.check(check_if_staff_or_ot) @commands.command(hidden=True) async def bones(self, ctx): - await ctx.send( - "https://cdn.discordapp.com/emojis/" "443501365843591169.png?v=1" - ) + await ctx.send("https://cdn.discordapp.com/emojis/443501365843591169.png?v=1") @commands.check(check_if_staff_or_ot) @commands.command(hidden=True) async def headpat(self, ctx): - await ctx.send( - "https://cdn.discordapp.com/emojis/" "465650811909701642.png?v=1" - ) + await ctx.send("https://cdn.discordapp.com/emojis/465650811909701642.png?v=1") @commands.check(check_if_staff_or_ot) @commands.command( @@ -143,7 +139,7 @@ class Meme(Cog): return await ctx.send("hedgeberg#7337 is ̶n͢ow b̕&̡.̷ 👍̡") elif target == self.bot.user: return await ctx.send( - f"I'm sorry {ctx.author.mention}, " "I'm afraid I can't do that." + f"I'm sorry {ctx.author.mention}, I'm afraid I can't do that." ) safe_name = await commands.clean_content().convert(ctx, str(target)) @@ -163,7 +159,7 @@ class Meme(Cog): async def yearoflinux(self, ctx): """Shows the year of Linux on the desktop""" await ctx.send( - f"{datetime.datetime.now().year} is the year of " "Linux on the Desktop" + f"{datetime.datetime.now().year} is the year of Linux on the Desktop" ) diff --git a/cogs/mod_timed.py b/cogs/mod_timed.py index bdfac32..5ed9f58 100644 --- a/cogs/mod_timed.py +++ b/cogs/mod_timed.py @@ -28,9 +28,7 @@ class ModTimed(Cog): if target == ctx.author: return await ctx.send("You can't do mod actions on yourself.") elif self.check_if_target_is_staff(target): - return await ctx.send( - "I can't ban this user as " "they're a member of staff." - ) + return await ctx.send("I can't ban this user as they're a member of staff.") expiry_timestamp = self.bot.parse_time(duration) expiry_datetime = datetime.utcfromtimestamp(expiry_timestamp) @@ -95,7 +93,7 @@ class ModTimed(Cog): return await ctx.send("You can't do mod actions on yourself.") elif self.check_if_target_is_staff(target): return await ctx.send( - "I can't mute this user as " "they're a member of staff." + "I can't mute this user as they're a member of staff." ) expiry_timestamp = self.bot.parse_time(duration) diff --git a/cogs/remind.py b/cogs/remind.py index 64abf9e..0a03ce7 100644 --- a/cogs/remind.py +++ b/cogs/remind.py @@ -44,7 +44,7 @@ class Remind(Cog): if current_timestamp + 5 > expiry_timestamp: msg = await ctx.send( - f"{ctx.author.mention}: Minimum " "remind interval is 5 seconds." + f"{ctx.author.mention}: Minimum remind interval is 5 seconds." ) await asyncio.sleep(5) await msg.delete() diff --git a/cogs/robocronp.py b/cogs/robocronp.py index d676464..ff9904a 100644 --- a/cogs/robocronp.py +++ b/cogs/robocronp.py @@ -65,7 +65,7 @@ class Robocronp(Cog): target_guild = self.bot.get_guild(job_details["guild"]) delete_job(timestamp, jobtype, job_name) await target_guild.unban( - target_user, reason="Robocronp: Timed " "ban expired." + target_user, reason="Robocronp: Timed ban expired." ) elif jobtype == "unmute": remove_restriction(job_name, config.mute_role) @@ -73,7 +73,7 @@ class Robocronp(Cog): target_member = target_guild.get_member(int(job_name)) target_role = target_guild.get_role(config.mute_role) await target_member.remove_roles( - target_role, reason="Robocronp: Timed " "mute expired." + target_role, reason="Robocronp: Timed mute expired." ) delete_job(timestamp, jobtype, job_name) elif jobtype == "remind":