diff --git a/requirements-dev.txt b/requirements-dev.txt
index 7bf4aed83..cc5be27ea 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,7 +1,7 @@
mock==5.1.0
nose2[coverage_plugin]==0.14.1
cov-core==1.15.0
-black==22.12.0
+black==24.2.0
pylint==3.0.3
splinter==0.21.0
selenium==4.18.1
diff --git a/searx/botdetection/config.py b/searx/botdetection/config.py
index d2710456f..b705f34d2 100644
--- a/searx/botdetection/config.py
+++ b/searx/botdetection/config.py
@@ -211,7 +211,6 @@ def value(name: str, data_dict: dict):
def validate(
schema_dict: typing.Dict, data_dict: typing.Dict, deprecated: typing.Dict[str, str]
) -> typing.Tuple[bool, list]:
-
"""Deep validation of dictionary in ``data_dict`` against dictionary in
``schema_dict``. Argument deprecated is a dictionary that maps deprecated
configuration names to a messages::
diff --git a/searx/engines/deezer.py b/searx/engines/deezer.py
index 63c71e3cc..3dd787c48 100644
--- a/searx/engines/deezer.py
+++ b/searx/engines/deezer.py
@@ -25,6 +25,7 @@ url = 'https://api.deezer.com/'
search_url = url + 'search?{query}&index={offset}'
iframe_src = "https://www.deezer.com/plugins/player?type=tracks&id={audioid}"
+
# do search-request
def request(query, params):
offset = (params['pageno'] - 1) * 25
diff --git a/searx/engines/freesound.py b/searx/engines/freesound.py
index ea6666621..b56b5a414 100644
--- a/searx/engines/freesound.py
+++ b/searx/engines/freesound.py
@@ -29,6 +29,7 @@ search_url = (
url + "search/text/?query={query}&page={page}&fields=name,url,download,created,description,type&token={api_key}"
)
+
# search request
def request(query, params):
params["url"] = search_url.format(
diff --git a/searx/engines/gentoo.py b/searx/engines/gentoo.py
index f0cb6a794..cf193c2a3 100644
--- a/searx/engines/gentoo.py
+++ b/searx/engines/gentoo.py
@@ -79,6 +79,7 @@ main_langs = {
'zh': '简体中文',
}
+
# do search-request
def request(query, params):
# translate the locale (e.g. 'en-US') to language code ('en')
diff --git a/searx/engines/pdbe.py b/searx/engines/pdbe.py
index 34c8d3227..a0526057d 100644
--- a/searx/engines/pdbe.py
+++ b/searx/engines/pdbe.py
@@ -66,14 +66,14 @@ def construct_body(result):
year=result['release_year'],
)
img_src = pdbe_preview_url.format(pdb_id=result['pdb_id'])
- except (KeyError):
+ except KeyError:
content = None
img_src = None
# construct url for preview image
try:
img_src = pdbe_preview_url.format(pdb_id=result['pdb_id'])
- except (KeyError):
+ except KeyError:
img_src = None
return [title, content, img_src]
diff --git a/searx/engines/sjp.py b/searx/engines/sjp.py
index 6daa46e78..711fed736 100644
--- a/searx/engines/sjp.py
+++ b/searx/engines/sjp.py
@@ -80,7 +80,7 @@ def response(resp):
for src in definitions:
infobox += f"
{src[0]}"
infobox += "
"
- for (def_text, sub_def) in src[1]:
+ for def_text, sub_def in src[1]:
infobox += f"- {def_text}
"
if sub_def:
infobox += ""
diff --git a/searx/engines/spotify.py b/searx/engines/spotify.py
index 87edb7f1b..491a7058e 100644
--- a/searx/engines/spotify.py
+++ b/searx/engines/spotify.py
@@ -29,6 +29,7 @@ api_client_secret = None
url = 'https://api.spotify.com/'
search_url = url + 'v1/search?{query}&type=track&offset={offset}'
+
# do search-request
def request(query, params):
offset = (params['pageno'] - 1) * 20
diff --git a/searx/engines/yandex_music.py b/searx/engines/yandex_music.py
index b44a5992e..5d6fe6bb1 100644
--- a/searx/engines/yandex_music.py
+++ b/searx/engines/yandex_music.py
@@ -31,6 +31,7 @@ paging = True
url = 'https://music.yandex.ru'
search_url = url + '/handlers/music-search.jsx'
+
# do search-request
def request(query, params):
args = {'text': query, 'page': params['pageno'] - 1}
diff --git a/searx/plugins/hostname_replace.py b/searx/plugins/hostname_replace.py
index 039aadb91..5a1df6921 100644
--- a/searx/plugins/hostname_replace.py
+++ b/searx/plugins/hostname_replace.py
@@ -22,7 +22,7 @@ _url_fields = ['iframe_src', 'audio_src']
def on_result(request, search, result):
- for (pattern, replacement) in replacements.items():
+ for pattern, replacement in replacements.items():
if parsed in result:
if pattern.search(result[parsed].netloc):
diff --git a/searx/preferences.py b/searx/preferences.py
index ad0e2867e..da486b0cb 100644
--- a/searx/preferences.py
+++ b/searx/preferences.py
@@ -39,7 +39,6 @@ MAP_STR2BOOL: Dict[str, bool] = OrderedDict(
class ValidationException(Exception):
-
"""Exption from ``cls.__init__`` when configuration value is invalid."""
diff --git a/searx/search/processors/online_currency.py b/searx/search/processors/online_currency.py
index c02b8eb99..eb242a9f6 100644
--- a/searx/search/processors/online_currency.py
+++ b/searx/search/processors/online_currency.py
@@ -32,7 +32,6 @@ def iso4217_to_name(iso4217, language):
class OnlineCurrencyProcessor(OnlineProcessor):
-
"""Processor class used by ``online_currency`` engines."""
engine_type = 'online_currency'
diff --git a/tests/unit/engines/test_command.py b/tests/unit/engines/test_command.py
index 7876dd55e..fa29c4e3f 100644
--- a/tests/unit/engines/test_command.py
+++ b/tests/unit/engines/test_command.py
@@ -14,7 +14,6 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
'''
-
from searx.engines import command as command_engine
from tests import SearxTestCase
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
index 6398e63f0..dcb2cb9f2 100644
--- a/tests/unit/test_utils.py
+++ b/tests/unit/test_utils.py
@@ -207,7 +207,9 @@ class TestXPathUtils(SearxTestCase):
l = utils.detect_language('The quick brown fox jumps over\nthe lazy dog')
self.assertEqual(l, 'en')
- l = utils.detect_language('いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす')
+ l = utils.detect_language(
+ 'いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす'
+ )
self.assertEqual(l, 'ja')
l = utils.detect_language('Pijamalı hasta yağız şoföre çabucak güvendi.')