*.py: various lints from dependency updates

This commit is contained in:
classabbyamp 2024-08-10 14:01:39 -04:00
parent cb76b548ed
commit 351692b96d
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
3 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@ SPDX-License-Identifier: LiLiQ-Rplus-1.1
""" """
import collections import collections.abc
import enum import enum
import json import json
import re import re
@ -167,7 +167,7 @@ def embed_factory(ctx: commands.Context) -> discord.Embed:
"""Creates an embed with neutral colour and standard footer.""" """Creates an embed with neutral colour and standard footer."""
embed = discord.Embed(timestamp=datetime.now(timezone.utc), colour=colours.neutral) embed = discord.Embed(timestamp=datetime.now(timezone.utc), colour=colours.neutral)
if ctx.author: if ctx.author:
embed.set_footer(text=str(ctx.author), icon_url=str(ctx.author.display_avatar)) embed.set_footer(text=str(ctx.author), icon_url=str(ctx.author.avatar))
return embed return embed

View File

@ -6,12 +6,13 @@ Copyright (C) 2021-2023 classabbyamp, 0x5c
SPDX-License-Identifier: LiLiQ-Rplus-1.1 SPDX-License-Identifier: LiLiQ-Rplus-1.1
""" """
import json
import utils.resources_models as models import utils.resources_models as models
print("Generating schema for index.json") print("Generating schema for index.json")
with open("./dev-notes/rs_index_schema.json", "w") as file: with open("./dev-notes/rs_index_schema.json", "w") as file:
file.write(models.Index.schema_json(indent=4)) json.dump(models.Index.model_json_schema(), file)
print("Done!") print("Done!")