run ruff check --fix

This commit is contained in:
2024-10-05 12:27:14 -04:00
parent 00212ea09d
commit 7919a63e04
14 changed files with 29 additions and 66 deletions
+1 -2
View File
@@ -2,7 +2,6 @@
Contains view and helper functions for confirming and processing deletes.
"""
from typing import Optional
import nextcord
from sqlalchemy import delete, select
@@ -61,7 +60,7 @@ class DeleteConfirmView(nextcord.ui.Modal):
await interaction.response.send_message("Deletion complete.", ephemeral=True)
def create_delete_id(group_id: int, category_id: Optional[int] = None) -> str:
def create_delete_id(group_id: int, category_id: int | None = None) -> str:
"""
Creates a delete id string to tell the view what to delete.
@@ -43,7 +43,6 @@ class UpdateUsernameVerifyView(nextcord.ui.View):
button (nextcord.ui.Button): unused
interaction (nextcord.Interaction): Interaction with the button
"""
with Session(engine) as session:
try:
embed_content = interaction.message.embeds[0].to_dict()
@@ -51,7 +50,7 @@ class UpdateUsernameVerifyView(nextcord.ui.View):
new_username: str = embed_content["fields"][1]["value"]
stmt = select(distinct(Score.CategoryId)).where(Score.UserName == old_username)
category_ids: "list[int]" = list(session.scalars(stmt))
category_ids: list[int] = list(session.scalars(stmt))
stmt = select(Score).where(Score.UserName == old_username)
for score in session.scalars(stmt):