*.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 json
import re
@ -167,7 +167,7 @@ def embed_factory(ctx: commands.Context) -> discord.Embed:
"""Creates an embed with neutral colour and standard footer."""
embed = discord.Embed(timestamp=datetime.now(timezone.utc), colour=colours.neutral)
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

View File

@ -65,7 +65,7 @@ class TimeCog(commands.Cog):
embed.title = f"{cmn.emojis.clock} Military Time Zones Now"
embed.colour = cmn.colours.good
embed.description = "```"
embed.description += "\n".join([f"{x}: {time + z :%Y-%m-%d %H:%M} {y}" for x, y, z in self.offsets])
embed.description += "\n".join([f"{x}: {time + z:%Y-%m-%d %H:%M} {y}" for x, y, z in self.offsets])
embed.description += "```"
embed.add_field(name="Notes", value=(
"**J** is not present in the table, and is used for local time.\n"

View File

@ -6,12 +6,13 @@ Copyright (C) 2021-2023 classabbyamp, 0x5c
SPDX-License-Identifier: LiLiQ-Rplus-1.1
"""
import json
import utils.resources_models as models
print("Generating schema for index.json")
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!")