From e421418210bc2a42148750c6a6b44a4574fb1f5a Mon Sep 17 00:00:00 2001 From: Ba Thien Le Date: Wed, 14 Aug 2024 14:52:36 +0200 Subject: [PATCH] chore: remove redundant list comprehension --- cbir/retrieval/retrieval.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cbir/retrieval/retrieval.py b/cbir/retrieval/retrieval.py index 71acc1e..0cecace 100644 --- a/cbir/retrieval/retrieval.py +++ b/cbir/retrieval/retrieval.py @@ -124,6 +124,4 @@ def search( labels, distances = self.indexer.search(outputs, nrt_neigh) filenames = [self.store.get(str(l)) or "" for l in labels] - return [ - (filename, distance) for filename, distance in zip(filenames, distances) - ] + return list(zip(filenames, distances))