From dee75accf626a554de9898eba619edd4bb8bba7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Thu, 29 Apr 2021 22:05:31 +0200 Subject: [PATCH] Fix remote PEP8 errors as well --- searx/engines/mysql_server.py | 6 +++++- searx/engines/postgresql.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/searx/engines/mysql_server.py b/searx/engines/mysql_server.py index e65217bb..70c7e26e 100644 --- a/searx/engines/mysql_server.py +++ b/searx/engines/mysql_server.py @@ -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) diff --git a/searx/engines/postgresql.py b/searx/engines/postgresql.py index e49a01d2..2c95f415 100644 --- a/searx/engines/postgresql.py +++ b/searx/engines/postgresql.py @@ -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)