From 23ce5d99360f359e67b4d85433d2e053ab2f02d9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 27 Jul 2024 21:01:02 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- palette/palette.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/palette/palette.py b/palette/palette.py index bdaee92b..96d7fe7b 100644 --- a/palette/palette.py +++ b/palette/palette.py @@ -70,9 +70,7 @@ async def palette( if not image: image = str(ctx.author.display_avatar) if attachments := ctx.message.attachments: - valid_attachments = [ - a for a in attachments if a.content_type.startswith("image/") - ] + valid_attachments = [a for a in attachments if a.content_type.startswith("image/")] if valid_attachments: image = valid_attachments[0].url @@ -80,7 +78,7 @@ async def palette( img = await self.get_img(image) if isinstance(img, dict): return await ctx.send(img["error"]) - + colors, file = await self.bot.loop.run_in_executor( None, self.create_palette, img, amount, detailed, sort )