style(aurora): reformat with ruff
This commit is contained in:
parent
ab22b791d1
commit
df22f73d2e
8 changed files with 64 additions and 102 deletions
|
@ -17,13 +17,9 @@ class ImportAuroraView(ui.View):
|
|||
self.message: Message = message
|
||||
|
||||
@ui.button(label="Yes", style=ButtonStyle.success)
|
||||
async def import_button_y(
|
||||
self, interaction: Interaction, button: ui.Button
|
||||
): # pylint: disable=unused-argument
|
||||
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
|
||||
)
|
||||
await interaction.response.send_message("Deleting original table...", ephemeral=True)
|
||||
|
||||
database = connect()
|
||||
cursor = database.cursor()
|
||||
|
@ -101,16 +97,10 @@ class ImportAuroraView(ui.View):
|
|||
|
||||
await interaction.edit_original_response(content="Import complete.")
|
||||
if failed_cases:
|
||||
await interaction.edit_original_response(
|
||||
content="Import complete.\n"
|
||||
+ warning("Failed to import the following cases:\n")
|
||||
+ box(failed_cases)
|
||||
)
|
||||
await interaction.edit_original_response(content="Import complete.\n" + warning("Failed to import the following cases:\n") + box(failed_cases))
|
||||
|
||||
@ui.button(label="No", style=ButtonStyle.danger)
|
||||
async def import_button_n(
|
||||
self, interaction: Interaction, button: ui.Button
|
||||
): # pylint: disable=unused-argument
|
||||
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)
|
||||
|
|
|
@ -16,13 +16,9 @@ class ImportGalacticBotView(ui.View):
|
|||
self.message: Message = message
|
||||
|
||||
@ui.button(label="Yes", style=ButtonStyle.success)
|
||||
async def import_button_y(
|
||||
self, interaction: Interaction, button: ui.Button
|
||||
): # pylint: disable=unused-argument
|
||||
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
|
||||
)
|
||||
await interaction.response.send_message("Deleting original table...", ephemeral=True)
|
||||
|
||||
database = connect()
|
||||
cursor = database.cursor()
|
||||
|
@ -92,9 +88,7 @@ class ImportGalacticBotView(ui.View):
|
|||
if resolved_by is None:
|
||||
resolved_by = "?"
|
||||
if resolved_reason is None:
|
||||
resolved_reason = (
|
||||
"Could not get resolve reason during moderation import."
|
||||
)
|
||||
resolved_reason = "Could not get resolve reason during moderation import."
|
||||
if resolved_timestamp is None:
|
||||
resolved_timestamp = timestamp
|
||||
changes = [
|
||||
|
@ -142,16 +136,10 @@ class ImportGalacticBotView(ui.View):
|
|||
|
||||
await interaction.edit_original_response(content="Import complete.")
|
||||
if failed_cases:
|
||||
await interaction.edit_original_response(
|
||||
content="Import complete.\n"
|
||||
+ warning("Failed to import the following cases:\n")
|
||||
+ box(failed_cases)
|
||||
)
|
||||
await interaction.edit_original_response(content="Import complete.\n" + warning("Failed to import the following cases:\n") + box(failed_cases))
|
||||
|
||||
@ui.button(label="No", style=ButtonStyle.danger)
|
||||
async def import_button_n(
|
||||
self, interaction: Interaction, button: ui.Button
|
||||
): # pylint: disable=unused-argument
|
||||
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