Black paginator.py with 120 char limit per line

This commit is contained in:
Maxikinz 2021-10-09 20:37:26 +02:00 committed by GitHub
parent c74fd90a9c
commit fae85d072f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,11 +91,7 @@ async def paginate(ctx, pages: list, title: str = None):
if view.value == "right":
index += 1
current_page = pages[index]
view = (
MiddlePageComps(ctx.author.id)
if current_page != last_page
else LastPageComps(ctx.author.id)
)
view = MiddlePageComps(ctx.author.id) if current_page != last_page else LastPageComps(ctx.author.id)
embed = current_page
if title:
embed.title = f"{title} | Page {index+1}/{total_pages}"
@ -103,11 +99,7 @@ async def paginate(ctx, pages: list, title: str = None):
elif view.value == "left":
index -= 1
current_page = pages[index]
view = (
MiddlePageComps(ctx.author.id)
if current_page != first_page
else FirstPageComps(ctx.author.id)
)
view = MiddlePageComps(ctx.author.id) if current_page != first_page else FirstPageComps(ctx.author.id)
embed = current_page
if title:
embed.title = f"{title} | Page {index+1}/{total_pages}"