1
0
mirror of https://github.com/searx/searx synced 2024-12-12 08:46:26 +01:00

Fix remote PEP8 errors as well

This commit is contained in:
Noémi Ványi 2021-04-29 22:05:31 +02:00
parent aa8288a963
commit dee75accf6
2 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,10 @@
MySQL database (Offline) 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 import mysql.connector
@ -49,7 +53,7 @@ def search(query, params):
def _fetch_results(cur): def _fetch_results(cur):
results = [] results = []
for res in cur: 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 result['template'] = result_template
results.append(result) results.append(result)

View File

@ -3,6 +3,10 @@
PostgreSQL database (Offline) PostgreSQL database (Offline)
""" """
# error is ignored because the admin has to
# install it manually to use the engine
# pylint: disable=import-error
import psycopg2 import psycopg2
engine_type = 'offline' engine_type = 'offline'
@ -41,7 +45,7 @@ def search(query, params):
with _connection: with _connection:
with _connection.cursor() as cur: with _connection.cursor() as cur:
cur.execute(query_str, query_params) cur.execute(query_to_run, query_params)
return _fetch_results(cur) return _fetch_results(cur)