fix(aurora): more ruff fixes
This commit is contained in:
parent
4407a99b8e
commit
2505dd0980
4 changed files with 14 additions and 24 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue