Compare commits

..

1 Commits

Author SHA1 Message Date
Daniel Sun 0655d4ceec fix ci
continuous-integration/drone/pr Build is passing Details
2023-01-09 19:45:16 +00:00
1 changed files with 6 additions and 0 deletions

View File

@ -61,17 +61,23 @@ def search_group(query, count):
def __init__(self, string, score):
self.string = string
self.score = score
# consider a score worse if the edit distance is larger
def __lt__(self, other):
return self.score > other.score
def __gt__(self, other):
return self.score < other.score
def __le__(self, other):
return self.score >= other.score
def __ge__(self, other):
return self.score <= other.score
def __eq__(self, other):
return self.score == other.score
def __ne__(self, other):
return self.score != other.score