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

@ -9,7 +9,6 @@ from redbot.core.utils.chat_formatting import box, warning
from ..utilities.database import connect, create_guild_table, mysql_log
# pylint: disable=duplicate-code
class ImportAuroraView(ui.View):
def __init__(self, timeout, ctx, message):
super().__init__()
@ -19,7 +18,7 @@ class ImportAuroraView(ui.View):
@ui.button(label="Yes", style=ButtonStyle.success)
async def import_button_y(
self, interaction: Interaction, button: ui.Button
): # pylint: disable=unused-argument
):
await self.message.delete()
await interaction.response.send_message(
"Deleting original table...", ephemeral=True
@ -41,7 +40,7 @@ class ImportAuroraView(ui.View):
await interaction.edit_original_response(content="Importing moderations...")
file = await self.ctx.message.attachments[0].read()
data: [dict] = sorted(json.loads(file), key=lambda x: x["moderation_id"])
data: list[dict] = sorted(json.loads(file), key=lambda x: x["moderation_id"])
user_mod_types = ["NOTE", "WARN", "MUTE", "UNMUTE", "KICK", "BAN", "UNBAN"]
@ -108,7 +107,7 @@ class ImportAuroraView(ui.View):
@ui.button(label="No", style=ButtonStyle.danger)
async def import_button_n(
self, interaction: Interaction, button: ui.Button
): # pylint: disable=unused-argument
):
await self.message.edit(content="Import cancelled.", view=None)
await self.message.delete(10)
await self.ctx.message.delete(10)