mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 10:32:21 +02:00
[enh] add checker
This commit is contained in:
parent
f7e11fd722
commit
8cbc9f2d58
11 changed files with 539 additions and 2 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue