Skip to content

Commit

Permalink
Fix useless .distinct()
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Nov 13, 2024
1 parent f919f42 commit bf47a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf47a57

Please sign in to comment.