[enh] add checker

This commit is contained in:
Alexandre Flament 2020-12-24 09:28:16 +01:00
parent f7e11fd722
commit 8cbc9f2d58
11 changed files with 539 additions and 2 deletions

View file

@ -64,6 +64,9 @@ class EngineRef:
def __eq__(self, other):
return self.name == other.name and self.category == other.category
def __hash__(self):
return hash((self.name, self.category))
class SearchQuery:
"""container for all the search parameters (query, language, etc...)"""
@ -108,6 +111,10 @@ class SearchQuery:
and self.timeout_limit == other.timeout_limit\
and self.external_bang == other.external_bang
def __hash__(self):
return hash((self.query, tuple(self.engineref_list), self.lang, self.safesearch, self.pageno, self.time_range,
self.timeout_limit, self.external_bang))
class Search:
"""Search information container"""