Fix black linting fuckups

This commit is contained in:
Ave Ozkal 2020-05-17 23:44:15 +03:00
parent b041a47c3d
commit 341e7e61c9
No known key found for this signature in database
GPG key ID: 398DD7BD03276F6D
7 changed files with 15 additions and 23 deletions

View file

@ -110,9 +110,7 @@ class Admin(Cog):
self.bot.unload_extension("cogs." + cog) self.bot.unload_extension("cogs." + cog)
self.bot.load_extension("cogs." + cog) self.bot.load_extension("cogs." + cog)
self.bot.log.info(f"Reloaded ext {cog}") self.bot.log.info(f"Reloaded ext {cog}")
await ctx.send( await ctx.send(f":white_check_mark: `{cog}` successfully reloaded.")
f":white_check_mark: `{cog}` " "successfully reloaded."
)
await self.cog_load_actions(cog) await self.cog_load_actions(cog)
except: except:
await ctx.send( await ctx.send(

View file

@ -79,7 +79,7 @@ class Common(Cog):
self.bot.log.info(f"Data from {url}: {text_data}") self.bot.log.info(f"Data from {url}: {text_data}")
return text_data return text_data
else: 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: except:
self.bot.log.error( self.bot.log.error(
f"Error while getting {url} " f"Error while getting {url} "
@ -94,7 +94,7 @@ class Common(Cog):
self.bot.log.debug(f"Data from {url}: {byte_data}") self.bot.log.debug(f"Data from {url}: {byte_data}")
return byte_data return byte_data
else: 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: except:
self.bot.log.error( self.bot.log.error(
f"Error while getting {url} " f"Error while getting {url} "
@ -110,7 +110,7 @@ class Common(Cog):
content_type = data.headers["Content-Type"] content_type = data.headers["Content-Type"]
return await data.json(content_type=content_type) return await data.json(content_type=content_type)
else: 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: except:
self.bot.log.error( self.bot.log.error(
f"Error while getting {url} " f"Error while getting {url} "

View file

@ -176,7 +176,7 @@ class Err(Cog):
await ctx.send(hex(errcode)) await ctx.send(hex(errcode))
else: else:
await ctx.send( 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"]) @commands.command(aliases=["h2e"])

View file

@ -67,7 +67,7 @@ class Meme(Cog):
description=f"Here's your ReSwitched Silver™," f"{user.mention}!", description=f"Here's your ReSwitched Silver™," f"{user.mention}!",
) )
embed.set_image( 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) await ctx.send(embed=embed)
@ -113,16 +113,12 @@ class Meme(Cog):
@commands.check(check_if_staff_or_ot) @commands.check(check_if_staff_or_ot)
@commands.command(hidden=True) @commands.command(hidden=True)
async def bones(self, ctx): async def bones(self, ctx):
await ctx.send( await ctx.send("https://cdn.discordapp.com/emojis/443501365843591169.png?v=1")
"https://cdn.discordapp.com/emojis/" "443501365843591169.png?v=1"
)
@commands.check(check_if_staff_or_ot) @commands.check(check_if_staff_or_ot)
@commands.command(hidden=True) @commands.command(hidden=True)
async def headpat(self, ctx): async def headpat(self, ctx):
await ctx.send( await ctx.send("https://cdn.discordapp.com/emojis/465650811909701642.png?v=1")
"https://cdn.discordapp.com/emojis/" "465650811909701642.png?v=1"
)
@commands.check(check_if_staff_or_ot) @commands.check(check_if_staff_or_ot)
@commands.command( @commands.command(
@ -143,7 +139,7 @@ class Meme(Cog):
return await ctx.send("hedgeberg#7337 is ̶n͢ow b̕&̡.̷ 👍̡") return await ctx.send("hedgeberg#7337 is ̶n͢ow b̕&̡.̷ 👍̡")
elif target == self.bot.user: elif target == self.bot.user:
return await ctx.send( 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)) safe_name = await commands.clean_content().convert(ctx, str(target))
@ -163,7 +159,7 @@ class Meme(Cog):
async def yearoflinux(self, ctx): async def yearoflinux(self, ctx):
"""Shows the year of Linux on the desktop""" """Shows the year of Linux on the desktop"""
await ctx.send( 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"
) )

View file

@ -28,9 +28,7 @@ class ModTimed(Cog):
if target == ctx.author: if target == ctx.author:
return await ctx.send("You can't do mod actions on yourself.") return await ctx.send("You can't do mod actions on yourself.")
elif self.check_if_target_is_staff(target): elif self.check_if_target_is_staff(target):
return await ctx.send( return await ctx.send("I can't ban this user as they're a member of staff.")
"I can't ban this user as " "they're a member of staff."
)
expiry_timestamp = self.bot.parse_time(duration) expiry_timestamp = self.bot.parse_time(duration)
expiry_datetime = datetime.utcfromtimestamp(expiry_timestamp) 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.") return await ctx.send("You can't do mod actions on yourself.")
elif self.check_if_target_is_staff(target): elif self.check_if_target_is_staff(target):
return await ctx.send( 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) expiry_timestamp = self.bot.parse_time(duration)

View file

@ -44,7 +44,7 @@ class Remind(Cog):
if current_timestamp + 5 > expiry_timestamp: if current_timestamp + 5 > expiry_timestamp:
msg = await ctx.send( 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 asyncio.sleep(5)
await msg.delete() await msg.delete()

View file

@ -65,7 +65,7 @@ class Robocronp(Cog):
target_guild = self.bot.get_guild(job_details["guild"]) target_guild = self.bot.get_guild(job_details["guild"])
delete_job(timestamp, jobtype, job_name) delete_job(timestamp, jobtype, job_name)
await target_guild.unban( await target_guild.unban(
target_user, reason="Robocronp: Timed " "ban expired." target_user, reason="Robocronp: Timed ban expired."
) )
elif jobtype == "unmute": elif jobtype == "unmute":
remove_restriction(job_name, config.mute_role) remove_restriction(job_name, config.mute_role)
@ -73,7 +73,7 @@ class Robocronp(Cog):
target_member = target_guild.get_member(int(job_name)) target_member = target_guild.get_member(int(job_name))
target_role = target_guild.get_role(config.mute_role) target_role = target_guild.get_role(config.mute_role)
await target_member.remove_roles( 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) delete_job(timestamp, jobtype, job_name)
elif jobtype == "remind": elif jobtype == "remind":