on master help sign in
Merge pull request #616 from stepshal/blank
baab6bcAdam Tauber
examples/basic_engine.py+1
@@ -1,6 +1,7 @@
1
1
2categories = ['general'] # optional
2categories = ['general'] # optional
3
3
4+
4def request(query, params):
5def request(query, params):
5 '''pre-request callback
6 '''pre-request callback
6 params<dict>:
7 params<dict>:
searx/engines/filecrop.py+1
@@ -8,6 +8,7 @@ paging = True
8
8
9
9
10class FilecropResultParser(HTMLParser):
10class FilecropResultParser(HTMLParser):
11+
11 def __init__(self):
12 def __init__(self):
12 HTMLParser.__init__(self)
13 HTMLParser.__init__(self)
13 self.__start_processing = False
14 self.__start_processing = False
searx/preferences.py+2
@@ -166,6 +166,7 @@ class SwitchableSetting(Setting):
166
166
167
167
168class EnginesSetting(SwitchableSetting):
168class EnginesSetting(SwitchableSetting):
169+
169 def _post_init(self):
170 def _post_init(self):
170 super(EnginesSetting, self)._post_init()
171 super(EnginesSetting, self)._post_init()
171 transformed_choices = []
172 transformed_choices = []
@@ -191,6 +192,7 @@ class EnginesSetting(SwitchableSetting):
191
192
192
193
193class PluginsSetting(SwitchableSetting):
194class PluginsSetting(SwitchableSetting):
195+
194 def _post_init(self):
196 def _post_init(self):
195 super(PluginsSetting, self)._post_init()
197 super(PluginsSetting, self)._post_init()
196 transformed_choices = []
198 transformed_choices = []
searx/results.py+1
@@ -91,6 +91,7 @@ def result_score(result):
91
91
92class ResultContainer(object):
92class ResultContainer(object):
93 """docstring for ResultContainer"""
93 """docstring for ResultContainer"""
94+
94 def __init__(self):
95 def __init__(self):
95 super(ResultContainer, self).__init__()
96 super(ResultContainer, self).__init__()
96 self.results = defaultdict(list)
97 self.results = defaultdict(list)
searx/utils.py+1
@@ -74,6 +74,7 @@ def highlight_content(content, query):
74
74
75
75
76class HTMLTextExtractor(HTMLParser):
76class HTMLTextExtractor(HTMLParser):
77+
77 def __init__(self):
78 def __init__(self):
78 HTMLParser.__init__(self)
79 HTMLParser.__init__(self)
79 self.result = []
80 self.result = []
searx/webapp.py+1
@@ -735,6 +735,7 @@ class ReverseProxyPathFix(object):
735
735
736 :param app: the WSGI application
736 :param app: the WSGI application
737 '''
737 '''
738+
738 def __init__(self, app):
739 def __init__(self, app):
739 self.app = app
740 self.app = app
740
741
tests/unit/test_preferences.py+2
@@ -4,6 +4,7 @@ from searx.testing import SearxTestCase
4
4
5
5
6class PluginStub(object):
6class PluginStub(object):
7+
7 def __init__(self, id, default_on):
8 def __init__(self, id, default_on):
8 self.id = id
9 self.id = id
9 self.default_on = default_on
10 self.default_on = default_on
@@ -11,6 +12,7 @@ class PluginStub(object):
11
12
12class TestSettings(SearxTestCase):
13class TestSettings(SearxTestCase):
13 # map settings
14 # map settings
15+
14 def test_map_setting_invalid_initialization(self):
16 def test_map_setting_invalid_initialization(self):
15 with self.assertRaises(MissingArgumentException):
17 with self.assertRaises(MissingArgumentException):
16 setting = MapSetting(3, wrong_argument={'0': 0})
18 setting = MapSetting(3, wrong_argument={'0': 0})
utils/fetch_currencies.py−1
@@ -37,7 +37,6 @@ def add_currency_name(name, iso4217):
37
37
38 db_names = db['names']
38 db_names = db['names']
39
39
40−
41 if not isinstance(iso4217, basestring):
40 if not isinstance(iso4217, basestring):
42 print "problem", name, iso4217
41 print "problem", name, iso4217
43 return
42 return