fix(aurora): pylint fix
Some checks failed
Actions / Lint Code (Pylint) (push) Failing after 16s
Actions / Build Documentation (MkDocs) (push) Successful in 13s

This commit is contained in:
SeaswimmerTheFsh 2024-02-03 13:41:57 -05:00
parent 21d5266bb6
commit 09ce2c7d73
Signed by: cswimr
GPG key ID: B8953EC01E5C4063
2 changed files with 70 additions and 58 deletions

View file

@ -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)