fix(bible): pylint fixes

This commit is contained in:
Seaswimmer 2024-02-02 12:55:19 -05:00
parent cf5e146f88
commit 067ded28f3
Signed by: cswimr
GPG key ID: B8953EC01E5C4063
2 changed files with 13 additions and 2 deletions

View file

@ -65,6 +65,7 @@ class Bible(commands.Cog):
if response.status == 503: if response.status == 503:
raise bible.errors.ServiceUnavailable() raise bible.errors.ServiceUnavailable()
return Version( return Version(
bible_id,
data["data"]["abbreviation"], data["data"]["abbreviation"],
data["data"]["language"]["name"], data["data"]["language"]["name"],
data["data"]["abbreviationLocal"], data["data"]["abbreviationLocal"],

View file

@ -1,12 +1,22 @@
class Version: class Version:
def __init__( def __init__(
self, abbreviation, language, abbreviationLocal, languageLocal, copyright self,
bible_id,
abbreviation,
language,
abbreviationLocal,
languageLocal,
version_copyright,
): ):
self.bible_id = bible_id
self.abbreviation = abbreviation self.abbreviation = abbreviation
self.language = language self.language = language
self.abbreviationLocal = abbreviationLocal self.abbreviationLocal = abbreviationLocal
self.languageLocal = languageLocal self.languageLocal = languageLocal
self.copyright = copyright self.copyright = version_copyright
def __str__(self): def __str__(self):
return self.abbreviationLocal return self.abbreviationLocal
def __repr__(self):
return f"bible.models.Version({self.bible_id}, {self.abbreviation}, {self.language}, {self.abbreviationLocal}, {self.languageLocal}, {self.copyright})"