summaryrefslogtreecommitdiff
path: root/searx/search
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-12-18 12:19:14 +0100
committerAlexandre Flament <alex@al-f.net>2020-12-18 12:29:48 +0100
commiteda8934f1548ed228d00a0196b61d35585ea11bc (patch)
treeac81fbe1a6154ad9338da92494bc9f9e3decdd75 /searx/search
parent995ba2f40643bd01134902eca91cacf0bab1ebdc (diff)
downloadsearxng-eda8934f1548ed228d00a0196b61d35585ea11bc.tar.gz
searxng-eda8934f1548ed228d00a0196b61d35585ea11bc.zip
[mod] searx.search.EngineRef: remove from_bang parameter
from_bang is True when the user query contains a bang. In this case the category is also set to 'none'. from_bang only usage was in searx.webadapter.parse_specific : if from_bang is True, then the EngineRef category is ignored and force to 'none'. This commit also removes the searx.webadapter.parse_sepecific function.
Diffstat (limited to 'searx/search')
-rw-r--r--searx/search/__init__.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/searx/search/__init__.py b/searx/search/__init__.py
index e9e4f5640..0d45f0b7c 100644
--- a/searx/search/__init__.py
+++ b/searx/search/__init__.py
@@ -52,18 +52,17 @@ def initialize(settings_engines=None):
class EngineRef:
- __slots__ = 'name', 'category', 'from_bang'
+ __slots__ = 'name', 'category'
- def __init__(self, name: str, category: str, from_bang: bool=False):
+ def __init__(self, name: str, category: str):
self.name = name
self.category = category
- self.from_bang = from_bang
def __repr__(self):
- return "EngineRef({!r}, {!r}, {!r})".format(self.name, self.category, self.from_bang)
+ return "EngineRef({!r}, {!r})".format(self.name, self.category)
def __eq__(self, other):
- return self.name == other.name and self.category == other.category and self.from_bang == other.from_bang
+ return self.name == other.name and self.category == other.category
class SearchQuery: