fix(repo): ruff fixes / removing pylint exceptions
This commit is contained in:
parent
e34d621e6d
commit
858a1bae8a
12 changed files with 51 additions and 56 deletions
|
@ -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)
|
||||
|
|
|
@ -8,7 +8,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 ImportGalacticBotView(ui.View):
|
||||
def __init__(self, timeout, ctx, message):
|
||||
super().__init__()
|
||||
|
@ -18,7 +17,7 @@ class ImportGalacticBotView(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
|
||||
|
@ -151,7 +150,7 @@ class ImportGalacticBotView(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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue