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."""