From 232af8759c7bada6fd2de3edda2df73c20894510 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Sun, 19 Feb 2023 04:02:12 +0000 Subject: [PATCH] Format Python code with psf/black push --- cogs/text_service_cog.py | 15 +++++++++++---- services/text_service.py | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cogs/text_service_cog.py b/cogs/text_service_cog.py index 199d1bb..521dc00 100644 --- a/cogs/text_service_cog.py +++ b/cogs/text_service_cog.py @@ -223,7 +223,8 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): channel_ids = self.conversation_thread_owners[normalized_user_id] if ctx.channel.id not in channel_ids: await ctx.reply( - "This is not a conversation thread that you own!", delete_after=5 + "This is not a conversation thread that you own!", + delete_after=5, ) except Exception: @@ -267,9 +268,13 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): if conversation_limit: try: owner_id = list(self.conversation_thread_owners.keys())[ - list([value for value in self.conversation_thread_owners.values()]).index(channel_id) + list( + [value for value in self.conversation_thread_owners.values()] + ).index(channel_id) ] - self.conversation_thread_owners[normalized_user_id].remove(ctx.channel.id) + self.conversation_thread_owners[normalized_user_id].remove( + ctx.channel.id + ) # Attempt to close and lock the thread. try: thread = await self.bot.fetch_channel(channel_id) @@ -282,7 +287,9 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): else: if normalized_user_id in self.conversation_thread_owners: thread_id = ctx.channel.id - self.conversation_thread_owners[normalized_user_id].remove(ctx.channel.id) + self.conversation_thread_owners[normalized_user_id].remove( + ctx.channel.id + ) # Attempt to close and lock the thread. try: diff --git a/services/text_service.py b/services/text_service.py index e92833f..9cca096 100644 --- a/services/text_service.py +++ b/services/text_service.py @@ -797,8 +797,8 @@ class EndConvoButton(discord.ui.Button["ConversationView"]): user_id = interaction.user.id if ( user_id in self.converser_cog.conversation_thread_owners - and interaction.channel.id in self.converser_cog.conversation_thread_owners[user_id] - + and interaction.channel.id + in self.converser_cog.conversation_thread_owners[user_id] ): try: await self.converser_cog.end_conversation(