From 7f2a81e3500d6572832ffea2377e7759544d0b73 Mon Sep 17 00:00:00 2001 From: cswimr Date: Sun, 26 Jan 2025 13:16:54 +0000 Subject: [PATCH] fix(bible): ruff fixes --- bible/bible.py | 22 +++++++++++----------- bible/models.py | 16 ++++++++-------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bible/bible.py b/bible/bible.py index a1da890a..0a976ec6 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -27,7 +27,7 @@ class Bible(commands.Cog): __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.1.2" + __version__ = "1.1.3" __documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/" def __init__(self, bot: Red): @@ -97,14 +97,14 @@ class Bible(commands.Cog): if response.status == 503: raise bible.errors.ServiceUnavailableError() return Version( - bible_id, - data["data"]["abbreviation"], - data["data"]["language"]["name"], - data["data"]["abbreviationLocal"], - data["data"]["language"]["nameLocal"], - data["data"]["description"], - data["data"]["descriptionLocal"], - data["data"]["copyright"], + bible_id=bible_id, + abbreviation=data["data"]["abbreviation"], + language=data["data"]["language"]["name"], + abbreviation_local=data["data"]["abbreviationLocal"], + language_local=data["data"]["language"]["nameLocal"], + description=data["data"]["description"], + description_local=data["data"]["descriptionLocal"], + version_copyright=data["data"]["copyright"], ) async def _get_passage( @@ -270,7 +270,7 @@ class Bible(commands.Cog): description=passage["content"].replace("¶ ", ""), color=await ctx.embed_color(), ) - embed.set_footer(text=f"{ctx.prefix}bible passage - Powered by API.Bible - {version.abbreviationLocal} ({version.languageLocal}, {version.descriptionLocal})", icon_url="attachment://icon.png") + embed.set_footer(text=f"{ctx.prefix}bible passage - Powered by API.Bible - {version.abbreviation_local} ({version.language_local}, {version.description_local})", icon_url="attachment://icon.png") await ctx.send(embed=embed, file=icon) else: await ctx.send(f"## {passage['reference']}\n{passage['content']}") @@ -309,7 +309,7 @@ class Bible(commands.Cog): description=passage["content"].replace("¶ ", ""), color=await ctx.embed_color(), ) - embed.set_footer(text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviationLocal} ({version.languageLocal}, {version.descriptionLocal})", icon_url="attachment://icon.png") + embed.set_footer(text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviation_local} ({version.language_local}, {version.description_local})", icon_url="attachment://icon.png") await ctx.send(embed=embed, file=icon) else: await ctx.send(f"## {passage['reference']}\n{passage['content']}") diff --git a/bible/models.py b/bible/models.py index 97500be3..b8e3b09f 100644 --- a/bible/models.py +++ b/bible/models.py @@ -4,23 +4,23 @@ class Version: bible_id, abbreviation, language, - abbreviationLocal, - languageLocal, + abbreviation_local, + language_local, description, - descriptionLocal, + description_local, version_copyright, ): self.bible_id = bible_id self.abbreviation = abbreviation self.language = language - self.abbreviationLocal = abbreviationLocal - self.languageLocal = languageLocal + self.abbreviation_local = abbreviation_local + self.language_local = language_local self.description = description - self.descriptionLocal = descriptionLocal + self.description_local = description_local self.copyright = version_copyright def __str__(self): - return self.abbreviationLocal + return self.abbreviation_local def __repr__(self): - return f'bible.models.Version("{self.bible_id}", "{self.abbreviation}", "{self.language}", "{self.abbreviationLocal}", "{self.languageLocal}", "{self.description}", "{self.descriptionLocal}", "{self.copyright}")' + return f'bible.models.Version("{self.bible_id}", "{self.abbreviation}", "{self.language}", "{self.abbreviation_local}", "{self.language_local}", "{self.description}", "{self.description_local}", "{self.copyright}")'