From c974b8cde11f133df7680967b759772c624007e9 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Wed, 9 Feb 2022 22:18:59 -0800 Subject: More spring cleaning. --- logical_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'logical_search.py') diff --git a/logical_search.py b/logical_search.py index 41ed729..c85b262 100644 --- a/logical_search.py +++ b/logical_search.py @@ -183,7 +183,7 @@ class Corpus(object): def invert_docid_set(self, original: Set[str]) -> Set[str]: """Invert a set of docids.""" - return set([docid for docid in self.documents_by_docid.keys() if docid not in original]) + return {docid for docid in self.documents_by_docid if docid not in original} def get_doc(self, docid: str) -> Optional[Document]: """Given a docid, retrieve the previously added Document.""" -- cgit v1.3