From bf47a57935cbf532f7520ad93e3f6e41dc2ca4b8 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Thu, 14 Nov 2024 00:32:09 +0100 Subject: [PATCH] Fix useless .distinct() --- plugins/imaging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/imaging.py b/plugins/imaging.py index 2d140d9..49ecece 100644 --- a/plugins/imaging.py +++ b/plugins/imaging.py @@ -325,7 +325,7 @@ async def robot9000(self, ctx: commands.Context, *, text_query: Optional[str] = .filter(Image9000.text.op('%>')(base_image9000.text)) ) for other_image9000, perceptual_distance, textual_similarity in ( - perceptual_matches.union(textual_matches).distinct() + perceptual_matches.union(textual_matches) .order_by("perceptual_distance", desc("textual_similarity")).limit(20) ): similar[other_image9000]["visual"] = 1 - perceptual_distance / self.IMAGE9000_HASH_BIT_COUNT