def __eq__(self, other)->Bool:
"""
Equality and hash do not hash the type (as some completer may not be
able to infer the type), but are use to (partially) de-duplicate
completion.
Completely de-duplicating completion is a bit tricker that just
comparing as it depends on surrounding text, which Completions are not
aware of.
"""
return self.start == other.start and \
self.end == other.end and \
self.text == other.text
评论列表
文章目录