mirror of
https://github.com/searxng/searxng.git
synced 2025-07-14 00:39:18 +02:00
[format.python] initial formatting of the python code
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
fcdc2c2cd2
commit
3d96a9839a
184 changed files with 2800 additions and 2836 deletions
|
@ -31,6 +31,7 @@ about = {
|
|||
# if there is a need for globals, use a leading underline
|
||||
_my_offline_engine = None
|
||||
|
||||
|
||||
def init(engine_settings=None):
|
||||
"""Initialization of the (offline) engine. The origin of this demo engine is a
|
||||
simple json string which is loaded in this example while the engine is
|
||||
|
@ -44,11 +45,10 @@ def init(engine_settings=None):
|
|||
', {"value":"first item"}'
|
||||
', {"value":"second item"}'
|
||||
', {"value":"third item"}'
|
||||
']'
|
||||
|
||||
% engine_settings.get('name')
|
||||
']' % engine_settings.get('name')
|
||||
)
|
||||
|
||||
|
||||
def search(query, request_params):
|
||||
"""Query (offline) engine and return results. Assemble the list of results from
|
||||
your local engine. In this demo engine we ignore the 'query' term, usual
|
||||
|
@ -62,11 +62,11 @@ def search(query, request_params):
|
|||
|
||||
for row in result_list:
|
||||
entry = {
|
||||
'query' : query,
|
||||
'language' : request_params['language'],
|
||||
'value' : row.get("value"),
|
||||
'query': query,
|
||||
'language': request_params['language'],
|
||||
'value': row.get("value"),
|
||||
# choose a result template or comment out to use the *default*
|
||||
'template' : 'key-value.html',
|
||||
'template': 'key-value.html',
|
||||
}
|
||||
ret_val.append(entry)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue