mirror of
https://github.com/searx/searx
synced 2024-11-30 06:00:17 +01:00
Fix remote PEP8 errors as well
This commit is contained in:
parent
aa8288a963
commit
dee75accf6
@ -3,6 +3,10 @@
|
||||
MySQL database (Offline)
|
||||
"""
|
||||
|
||||
# error is ignored because the admin has to
|
||||
# install it manually to use the engine
|
||||
# pylint: disable=import-error
|
||||
|
||||
import mysql.connector
|
||||
|
||||
|
||||
@ -49,7 +53,7 @@ def search(query, params):
|
||||
def _fetch_results(cur):
|
||||
results = []
|
||||
for res in cur:
|
||||
result = dict(zip(cur.column_names, map(str, res))),
|
||||
result = dict(zip(cur.column_names, map(str, res)))
|
||||
result['template'] = result_template
|
||||
results.append(result)
|
||||
|
||||
|
@ -3,6 +3,10 @@
|
||||
PostgreSQL database (Offline)
|
||||
"""
|
||||
|
||||
# error is ignored because the admin has to
|
||||
# install it manually to use the engine
|
||||
# pylint: disable=import-error
|
||||
|
||||
import psycopg2
|
||||
|
||||
engine_type = 'offline'
|
||||
@ -41,7 +45,7 @@ def search(query, params):
|
||||
|
||||
with _connection:
|
||||
with _connection.cursor() as cur:
|
||||
cur.execute(query_str, query_params)
|
||||
cur.execute(query_to_run, query_params)
|
||||
|
||||
return _fetch_results(cur)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user