fix(aurora): pylint fix
This commit is contained in:
parent
21d5266bb6
commit
09ce2c7d73
2 changed files with 70 additions and 58 deletions
|
@ -19,6 +19,7 @@ class ImportAuroraView(ui.View):
|
|||
async def import_button_y(
|
||||
self, interaction: Interaction, button: ui.Button
|
||||
): # pylint: disable=unused-argument
|
||||
# pylint: disable=duplicate-code
|
||||
await self.message.delete()
|
||||
await interaction.response.send_message(
|
||||
"Deleting original table...", ephemeral=True
|
||||
|
@ -68,10 +69,8 @@ class ImportAuroraView(ui.View):
|
|||
metadata = {}
|
||||
else:
|
||||
metadata: Dict[str, any] = json.loads(case["metadata"])
|
||||
if not metadata.get('imported_from'):
|
||||
metadata.update({
|
||||
'imported_from': 'Aurora'
|
||||
})
|
||||
if not metadata.get("imported_from"):
|
||||
metadata.update({"imported_from": "Aurora"})
|
||||
|
||||
if case["duration"] != "NULL":
|
||||
hours, minutes, seconds = map(int, case["duration"].split(":"))
|
||||
|
@ -101,7 +100,9 @@ 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)
|
||||
content="Import complete.\n"
|
||||
+ warning("Failed to import the following cases:\n")
|
||||
+ box(failed_cases)
|
||||
)
|
||||
|
||||
@ui.button(label="No", style=ButtonStyle.danger)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue