fix(repo): ruff fixes / removing pylint exceptions
All checks were successful
Actions / Lint Code (Ruff) (push) Successful in 6s
Actions / Build Documentation (MkDocs) (push) Successful in 25s

This commit is contained in:
SeaswimmerTheFsh 2024-02-14 11:04:26 -05:00
parent e34d621e6d
commit 858a1bae8a
Signed by: cswimr
GPG key ID: B8953EC01E5C4063
12 changed files with 51 additions and 56 deletions

View file

@ -1,9 +1,11 @@
from discord import ButtonStyle, ui, Interaction
from discord import ButtonStyle, Interaction, ui
from redbot.core import commands
from redbot.core.utils.chat_formatting import error
from aurora.utilities.factory import addrole_embed
from aurora.utilities.config import config
from aurora.utilities.factory import addrole_embed
class Addrole(ui.View):
def __init__(self, ctx: commands.Context):
@ -25,7 +27,7 @@ class Addrole(ui.View):
await interaction.message.edit(embed=await addrole_embed(self.ctx))
@ui.button(label="Clear", style=ButtonStyle.red, row=1)
async def clear(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
async def clear(self, interaction: Interaction, button: ui.Button):
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
await interaction.response.send_message(error("You must have the manage guild permission to clear the guild's addrole whitelist."), ephemeral=True)
return
@ -34,7 +36,7 @@ class Addrole(ui.View):
await interaction.message.edit(embed=await addrole_embed(self.ctx))
@ui.button(label="Close", style=ButtonStyle.gray)
async def close(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
async def close(self, interaction: Interaction, button: ui.Button):
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
await interaction.response.send_message(error("You can't do that!"), ephemeral=True)
return