From 351692b96dbc1bd0ab00e37d5239302cc24e39c6 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 10 Aug 2024 14:01:39 -0400 Subject: [PATCH] *.py: various lints from dependency updates --- common.py | 4 ++-- exts/time.py | 2 +- resource_schemas.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common.py b/common.py index 9b5d092..bb47795 100644 --- a/common.py +++ b/common.py @@ -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 diff --git a/exts/time.py b/exts/time.py index b4c692a..b2f50bf 100644 --- a/exts/time.py +++ b/exts/time.py @@ -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" diff --git a/resource_schemas.py b/resource_schemas.py index 2e96124..cc915da 100644 --- a/resource_schemas.py +++ b/resource_schemas.py @@ -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!")