Skip to content

Commit

Permalink
style: fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
y-young committed Dec 25, 2023
1 parent d1ee418 commit 1aa38a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nazurin/sites/bilibili/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ async def get_dynamic(self, dynamic_id: str):
raise NazurinError("Dynamic not found")
if code != 0:
raise NazurinError(
f"Failed to get dynamic: code = {code}, message = {data['message']}"
f"Failed to get dynamic: code = {code}, "
f"message = {data['message']}"
)
item = data["data"]["item"]
return self.cleanup_item(item)
Expand All @@ -47,7 +48,7 @@ def get_images(item: dict) -> List[Image]:
if not major_items:
raise NazurinError("No image found")
draw_items = major_items["draw"]["items"]
if not len(draw_items):
if len(draw_items) == 0:
raise NazurinError("No image found")
imgs = []
for index, pic in enumerate(draw_items):
Expand Down

0 comments on commit 1aa38a6

Please sign in to comment.