SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[mod] make python code pylint 2.16.1 compliant
Markus Heiser4c06837a5047
diff --git a/.pylintrc b/.pylintrcindex 51cea773e..a5b00227e 100644--- a/.pylintrc+++ b/.pylintrc@@ -404,4 +404,4 @@ known-third-party=enchant# Exceptions that will emit a warning when being caught. Defaults to# "Exception"-overgeneral-exceptions=Exception+overgeneral-exceptions=builtins.Exceptiondiff --git a/searx/autocomplete.py b/searx/autocomplete.pyindex 6fb5537a2..aeb697a14 100644--- a/searx/autocomplete.py+++ b/searx/autocomplete.py@@ -3,6 +3,7 @@"""This module implements functions needed for the autocompleter."""+# pylint: disable=use-dict-literalfrom json import loadsfrom urllib.parse import urlencodediff --git a/searx/engines/crossref.py b/searx/engines/crossref.pyindex fbe2f0c2a..e12a0da5b 100644--- a/searx/engines/crossref.py+++ b/searx/engines/crossref.py@@ -2,6 +2,7 @@# lint: pylint"""Semantic Scholar (Science)"""+# pylint: disable=use-dict-literalfrom urllib.parse import urlencodefrom searx.utils import html_to_textdiff --git a/searx/engines/docker_hub.py b/searx/engines/docker_hub.pyindex 1e492b196..cde96d016 100644--- a/searx/engines/docker_hub.py+++ b/searx/engines/docker_hub.py@@ -3,6 +3,7 @@"""Docker Hub (IT)"""+# pylint: disable=use-dict-literalfrom json import loadsfrom urllib.parse import urlencodediff --git a/searx/engines/gigablast.py b/searx/engines/gigablast.pyindex 1c40ff331..382711b10 100644--- a/searx/engines/gigablast.py+++ b/searx/engines/gigablast.py@@ -3,7 +3,7 @@"""Gigablast (Web)"""-# pylint: disable=invalid-name+# pylint: disable=invalid-name, use-dict-literalimport refrom time import timediff --git a/searx/search/processors/online.py b/searx/search/processors/online.pyindex dd5d1e36b..242718416 100644--- a/searx/search/processors/online.py+++ b/searx/search/processors/online.py@@ -4,6 +4,7 @@"""Processores for engine-type: ``online``"""+# pylint: disable=use-dict-literalfrom timeit import default_timerimport asynciodiff --git a/searx/webapp.py b/searx/webapp.pyindex d9ca3941c..07225908c 100755--- a/searx/webapp.py+++ b/searx/webapp.py@@ -5,6 +5,8 @@"""WebbApp"""+# pylint: disable=use-dict-literal+import hashlibimport hmacimport jsondiff --git a/searxng_extra/update/update_ahmia_blacklist.py b/searxng_extra/update/update_ahmia_blacklist.pyindex 26c485195..a11413f14 100755--- a/searxng_extra/update/update_ahmia_blacklist.py+++ b/searxng_extra/update/update_ahmia_blacklist.py@@ -9,6 +9,7 @@ Output file: :origin:`searx/data/ahmia_blacklist.txt` (:origin:`CI Update data.. _Ahmia's blacklist: https://ahmia.fi/blacklist/"""+# pylint: disable=use-dict-literalfrom os.path import join@@ -21,6 +22,7 @@ URL = 'https://ahmia.fi/blacklist/banned/'def fetch_ahmia_blacklist():resp = requests.get(URL, timeout=3.0)if resp.status_code != 200:+ # pylint: disable=broad-exception-raisedraise Exception("Error fetching Ahmia blacklist, HTTP code " + resp.status_code)return resp.text.split()diff --git a/searxng_extra/update/update_firefox_version.py b/searxng_extra/update/update_firefox_version.pyindex 384d0002f..51aec39c5 100755--- a/searxng_extra/update/update_firefox_version.py+++ b/searxng_extra/update/update_firefox_version.py@@ -1,13 +1,13 @@#!/usr/bin/env python# lint: pylint# SPDX-License-Identifier: AGPL-3.0-or-later-"""Fetch firefox useragent signaturesOutput file: :origin:`searx/data/useragents.json` (:origin:`CI Update data ...<.github/workflows/data-update.yml>`)."""+# pylint: disable=use-dict-literalimport jsonimport re@@ -40,6 +40,7 @@ useragents = {def fetch_firefox_versions():resp = requests.get(URL, timeout=2.0)if resp.status_code != 200:+ # pylint: disable=broad-exception-raisedraise Exception("Error fetching firefox versions, HTTP code " + resp.status_code)dom = html.fromstring(resp.text)versions = []