summaryrefslogtreecommitdiff
path: root/logical_search.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2022-02-09 22:18:59 -0800
committerScott Gasch <[email protected]>2022-02-09 22:18:59 -0800
commitc974b8cde11f133df7680967b759772c624007e9 (patch)
tree9d6e60f8cd2317c4b836ca65696d956b644a7bc1 /logical_search.py
parent804988efe7c8b131fc0c4b30088de2b5c5bd0b74 (diff)
More spring cleaning.
Diffstat (limited to 'logical_search.py')
-rw-r--r--logical_search.py2
1 files changed, 1 insertions, 1 deletions
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."""