fix(bible): pylint fixes
All checks were successful
Actions / Lint Code (Pylint) (push) Successful in 16s
Actions / Build Documentation (MkDocs) (push) Successful in 11s

This commit is contained in:
Seaswimmer 2024-02-01 18:58:52 -05:00
parent e1746281c8
commit 005d0c1c8b
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -5,7 +5,6 @@
# ____) | __/ (_| \__ \\ V V /| | | | | | | | | | | | __/ | # ____) | __/ (_| \__ \\ V V /| | | | | | | | | | | | __/ |
# |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_| # |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_|
import json
import logging import logging
import random import random
@ -37,7 +36,7 @@ class Bible(commands.Cog):
book_name = book_name.title() book_name = book_name.title()
books = await self._get_books(bible_id) books = await self._get_books(bible_id)
for book in books: for book in books:
if book_name == book["abbreviation"] or book_name == book["name"]: if book_name in (book["abbreviation"], book["name"]):
return book["id"] return book["id"]
raise ValueError(f"Book {book_name} not found.") raise ValueError(f"Book {book_name} not found.")