From fcdc2c2cd26e24c2aa3f064d93cee3e29dc2a30c Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 27 Dec 2021 09:16:03 +0100 Subject: [format.python] disable py code formatting for some hunks of code Disable the python code formatting from python-black, where the readability of code suffers by formatting. Signed-off-by: Markus Heiser --- searx/engines/archlinux.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'searx/engines/archlinux.py') diff --git a/searx/engines/archlinux.py b/searx/engines/archlinux.py index aeac145d1..1aa8d0ade 100644 --- a/searx/engines/archlinux.py +++ b/searx/engines/archlinux.py @@ -39,6 +39,7 @@ def locale_to_lang_code(locale): # wikis for some languages were moved off from the main site, we need to make # requests to correct URLs to be able to get results in those languages lang_urls = { + # fmt: off 'all': { 'base': 'https://wiki.archlinux.org', 'search': '/index.php?title=Special:Search&offset={offset}&{query}' @@ -63,6 +64,7 @@ lang_urls = { 'base': 'http://archtr.org/wiki', 'search': '/index.php?title=Özel:Ara&offset={offset}&{query}' } + # fmt: on } -- cgit v1.2.3 From 3d96a9839a12649874b6d4cf9466bd3616b0a03c Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 27 Dec 2021 09:26:22 +0100 Subject: [format.python] initial formatting of the python code This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser --- searx/engines/archlinux.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'searx/engines/archlinux.py') diff --git a/searx/engines/archlinux.py b/searx/engines/archlinux.py index 1aa8d0ade..1cfb3983f 100644 --- a/searx/engines/archlinux.py +++ b/searx/engines/archlinux.py @@ -97,7 +97,7 @@ main_langs = { 'sl': 'Slovenský', 'th': 'ไทย', 'uk': 'Українська', - 'zh': '简体中文' + 'zh': '简体中文', } supported_languages = dict(lang_urls, **main_langs) @@ -141,7 +141,6 @@ def response(resp): href = urljoin(base_url, link.attrib.get('href')) title = extract_text(link) - results.append({'url': href, - 'title': title}) + results.append({'url': href, 'title': title}) return results -- cgit v1.2.3