Skip to content

Commit

Permalink
Format Python code with psf/black push
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and github-actions committed Feb 9, 2023
1 parent 6983f81 commit 63b5f17
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 9 deletions.
12 changes: 10 additions & 2 deletions cogs/prompt_optimizer_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ class DrawButton(discord.ui.Button["OptimizeView"]):
def __init__(
self, converser_cog, image_service_cog, deletion_queue, custom_api_key
):
super().__init__(style=discord.ButtonStyle.green, label="Draw", custom_id="draw_button_optimizer")
super().__init__(
style=discord.ButtonStyle.green,
label="Draw",
custom_id="draw_button_optimizer",
)
self.converser_cog = converser_cog
self.image_service_cog = image_service_cog
self.deletion_queue = deletion_queue
Expand Down Expand Up @@ -237,7 +241,11 @@ class RedoButton(discord.ui.Button["OptimizeView"]):
def __init__(
self, converser_cog, image_service_cog, deletion_queue, custom_api_key=None
):
super().__init__(style=discord.ButtonStyle.danger, label="Retry", custom_id="redo_button_optimizer")
super().__init__(
style=discord.ButtonStyle.danger,
label="Retry",
custom_id="redo_button_optimizer",
)
self.converser_cog = converser_cog
self.image_service_cog = image_service_cog
self.deletion_queue = deletion_queue
Expand Down
18 changes: 15 additions & 3 deletions services/image_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ async def on_timeout(self):

class VaryButton(discord.ui.Button):
def __init__(self, number, image_url, cog, converser_cog, custom_api_key):
super().__init__(style=discord.ButtonStyle.blurple, label="Vary " + str(number), custom_id="vary_button")
super().__init__(
style=discord.ButtonStyle.blurple,
label="Vary " + str(number),
custom_id="vary_button",
)
self.number = number
self.image_url = image_url
self.cog = cog
Expand Down Expand Up @@ -318,7 +322,11 @@ async def callback(self, interaction: discord.Interaction):

class SaveButton(discord.ui.Button["SaveView"]):
def __init__(self, number: int, image_url: str):
super().__init__(style=discord.ButtonStyle.gray, label="Save " + str(number), custom_id="save_button")
super().__init__(
style=discord.ButtonStyle.gray,
label="Save " + str(number),
custom_id="save_button",
)
self.number = number
self.image_url = image_url

Expand Down Expand Up @@ -349,7 +357,11 @@ async def callback(self, interaction: discord.Interaction):

class RedoButton(discord.ui.Button["SaveView"]):
def __init__(self, cog, converser_cog, custom_api_key):
super().__init__(style=discord.ButtonStyle.danger, label="Retry", custom_id="redo_button_draw_main")
super().__init__(
style=discord.ButtonStyle.danger,
label="Retry",
custom_id="redo_button_draw_main",
)
self.cog = cog
self.converser_cog = converser_cog
self.custom_api_key = custom_api_key
Expand Down
20 changes: 16 additions & 4 deletions services/moderations_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ def __init__(

class ApproveMessageButton(discord.ui.Button["ModerationAdminView"]):
def __init__(self, message, moderation_message, current_num):
super().__init__(style=discord.ButtonStyle.green, label="Approve", custom_id="approve_button")
super().__init__(
style=discord.ButtonStyle.green, label="Approve", custom_id="approve_button"
)
self.message = message
self.moderation_message = moderation_message
self.current_num = current_num
Expand All @@ -336,7 +338,11 @@ async def callback(self, interaction: discord.Interaction):

class DeleteMessageButton(discord.ui.Button["ModerationAdminView"]):
def __init__(self, message, moderation_message, current_num):
super().__init__(style=discord.ButtonStyle.danger, label="Delete Message", custom_id="delete_button")
super().__init__(
style=discord.ButtonStyle.danger,
label="Delete Message",
custom_id="delete_button",
)
self.message = message
self.moderation_message = moderation_message
self.current_num = current_num
Expand All @@ -361,7 +367,9 @@ async def callback(self, interaction: discord.Interaction):

class KickUserButton(discord.ui.Button["ModerationAdminView"]):
def __init__(self, message, moderation_message, current_num):
super().__init__(style=discord.ButtonStyle.danger, label="Kick User", custom_id="kick_button")
super().__init__(
style=discord.ButtonStyle.danger, label="Kick User", custom_id="kick_button"
)
self.message = message
self.moderation_message = moderation_message
self.current_num = current_num
Expand Down Expand Up @@ -400,7 +408,11 @@ class TimeoutUserButton(discord.ui.Button["ModerationAdminView"]):
def __init__(
self, message, moderation_message, current_num, hours, nodelete, source_deleted
):
super().__init__(style=discord.ButtonStyle.danger, label=f"Timeout {hours}h", custom_id="timeout_button")
super().__init__(
style=discord.ButtonStyle.danger,
label=f"Timeout {hours}h",
custom_id="timeout_button",
)
self.message = message
self.moderation_message = moderation_message
self.hours = hours
Expand Down

0 comments on commit 63b5f17

Please sign in to comment.