fix(aurora): more ruff fixes
All checks were successful
Actions / Build Documentation (MkDocs) (push) Successful in 32s
Actions / Lint Code (Ruff & Pylint) (push) Successful in 36s

This commit is contained in:
cswimr 2025-03-28 10:22:08 -05:00
parent 4407a99b8e
commit 2505dd0980
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
4 changed files with 14 additions and 24 deletions

View file

@ -104,7 +104,7 @@ async def get_next_case_number(guild_id: str, cursor=None) -> int:
def generate_dict(result) -> dict:
case = {
return {
"moderation_id": result[0],
"timestamp": result[1],
"moderation_type": result[2],
@ -122,7 +122,6 @@ def generate_dict(result) -> dict:
"changes": json.loads(result[14]),
"metadata": json.loads(result[15]),
}
return case
async def fetch_user_dict(client: commands.Bot, user_id: str) -> dict:
@ -175,11 +174,9 @@ async def fetch_role_dict(guild: Guild, role_id: int) -> dict:
"""This function returns a dictionary containing either role information or a standard deleted role template."""
role = guild.get_role(int(role_id))
if not role:
role_dict = {"id": role_id, "name": "Deleted Role"}
pass
role_dict = {"id": role.id, "name": role.name}
return role_dict
return {"id": role.id, "name": role.name}
async def log(interaction: Interaction, moderation_id: int, resolved: bool = False) -> None:
@ -245,16 +242,9 @@ def create_pagesize_options() -> list[SelectOption]:
label="Default",
value="default",
description="Reset the pagesize to the default value.",
)
),
)
for i in range(1, 21):
options.append(
SelectOption(
label=str(i),
value=str(i),
description=f"Set the pagesize to {i}.",
)
)
options.extend(SelectOption(label=str(i), value=str(i), description=f"Set the pagesize to {i}") for i in range(1, 21))
return options