diff options
Diffstat (limited to 'searxng_extra')
-rw-r--r-- | searxng_extra/__init__.py | 2 | ||||
-rwxr-xr-x | searxng_extra/docs_prebuild | 12 | ||||
-rwxr-xr-x | searxng_extra/standalone_searx.py | 3 | ||||
-rw-r--r-- | searxng_extra/update/__init__.py | 2 | ||||
-rwxr-xr-x | searxng_extra/update/update_ahmia_blacklist.py | 1 | ||||
-rwxr-xr-x | searxng_extra/update/update_currencies.py | 2 | ||||
-rwxr-xr-x | searxng_extra/update/update_engine_descriptions.py | 2 | ||||
-rwxr-xr-x | searxng_extra/update/update_engine_traits.py | 3 | ||||
-rwxr-xr-x | searxng_extra/update/update_external_bangs.py | 1 | ||||
-rwxr-xr-x | searxng_extra/update/update_firefox_version.py | 1 | ||||
-rwxr-xr-x | searxng_extra/update/update_locales.py | 1 | ||||
-rwxr-xr-x | searxng_extra/update/update_osm_keys_tags.py | 1 | ||||
-rwxr-xr-x | searxng_extra/update/update_pygments.py | 1 | ||||
-rwxr-xr-x | searxng_extra/update/update_wikidata_units.py | 3 |
14 files changed, 10 insertions, 25 deletions
diff --git a/searxng_extra/__init__.py b/searxng_extra/__init__.py index e69de29bb..9ed59c825 100644 --- a/searxng_extra/__init__.py +++ b/searxng_extra/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# pylint: disable=missing-module-docstring diff --git a/searxng_extra/docs_prebuild b/searxng_extra/docs_prebuild index f19d59800..9e4a18524 100755 --- a/searxng_extra/docs_prebuild +++ b/searxng_extra/docs_prebuild @@ -1,7 +1,5 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later - """Script that implements some prebuild tasks needed by target docs.prebuild """ @@ -9,10 +7,10 @@ import sys import os.path import time from contextlib import contextmanager + from searx import settings, get_setting, locales from searx.infopage import InfoPageSet, InfoPage - _doc_user = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'docs', 'user')) @@ -27,13 +25,13 @@ def main(): with infopageset_ctx as infopageset: for _, _, page in infopageset.iter_pages('en'): fname = os.path.join(_doc_user, os.path.basename(page.fname)) - with open(fname, 'w') as f: + with open(fname, 'w', encoding='utf-8') as f: f.write(page.content) -class OfflinePage(InfoPage): +class OfflinePage(InfoPage): # pylint: disable=missing-class-docstring - def get_ctx(self): # pylint: disable=no-self-use + def get_ctx(self): """Jinja context to render :py:obj:`DocPage.content` for offline purpose (no links to SearXNG instance)""" @@ -55,7 +53,7 @@ def _instance_infosetset_ctx(base_url): # registered in the Flask app. settings['server']['secret_key'] = '' - from searx.webapp import app + from searx.webapp import app # pylint: disable=import-outside-toplevel # Specify base_url so that url_for() works for base_urls. If base_url is # specified, then these values from are given preference over any Flask's diff --git a/searxng_extra/standalone_searx.py b/searxng_extra/standalone_searx.py index 2ce9925c5..cf053d7ee 100755 --- a/searxng_extra/standalone_searx.py +++ b/searxng_extra/standalone_searx.py @@ -1,8 +1,5 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later -# (C) Copyright Contributors to the SearXNG project. - """Script to run SearXNG from terminal. DON'T USE THIS SCRIPT!! diff --git a/searxng_extra/update/__init__.py b/searxng_extra/update/__init__.py index e69de29bb..9ed59c825 100644 --- a/searxng_extra/update/__init__.py +++ b/searxng_extra/update/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# pylint: disable=missing-module-docstring diff --git a/searxng_extra/update/update_ahmia_blacklist.py b/searxng_extra/update/update_ahmia_blacklist.py index 8bee4a808..c890b3760 100755 --- a/searxng_extra/update/update_ahmia_blacklist.py +++ b/searxng_extra/update/update_ahmia_blacklist.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later """This script saves `Ahmia's blacklist`_ for onion sites. diff --git a/searxng_extra/update/update_currencies.py b/searxng_extra/update/update_currencies.py index a949c4696..dcfa6e7a2 100755 --- a/searxng_extra/update/update_currencies.py +++ b/searxng_extra/update/update_currencies.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later - """Fetch currencies from :origin:`searx/engines/wikidata.py` engine. Output file: :origin:`searx/data/currencies.json` (:origin:`CI Update data ... diff --git a/searxng_extra/update/update_engine_descriptions.py b/searxng_extra/update/update_engine_descriptions.py index fc793ea2f..916e18802 100755 --- a/searxng_extra/update/update_engine_descriptions.py +++ b/searxng_extra/update/update_engine_descriptions.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later - """Fetch website description from websites and from :origin:`searx/engines/wikidata.py` engine. diff --git a/searxng_extra/update/update_engine_traits.py b/searxng_extra/update/update_engine_traits.py index eb4484f62..ef5dc607c 100755 --- a/searxng_extra/update/update_engine_traits.py +++ b/searxng_extra/update/update_engine_traits.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later """Update :py:obj:`searx.enginelib.traits.EngineTraitsMap` and :origin:`searx/languages.py` @@ -28,7 +27,7 @@ from searx.enginelib.traits import EngineTraitsMap # Output files. languages_file = Path(searx_dir) / 'sxng_locales.py' languages_file_header = """\ -# -*- coding: utf-8 -*- +# SPDX-License-Identifier: AGPL-3.0-or-later '''List of SearXNG's locale codes. .. hint:: diff --git a/searxng_extra/update/update_external_bangs.py b/searxng_extra/update/update_external_bangs.py index 9896d1d7d..1d367a887 100755 --- a/searxng_extra/update/update_external_bangs.py +++ b/searxng_extra/update/update_external_bangs.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later """Update :origin:`searx/data/external_bangs.json` using the duckduckgo bangs from :py:obj:`BANGS_URL`. diff --git a/searxng_extra/update/update_firefox_version.py b/searxng_extra/update/update_firefox_version.py index ad6d9b842..451530ca8 100755 --- a/searxng_extra/update/update_firefox_version.py +++ b/searxng_extra/update/update_firefox_version.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later """Fetch firefox useragent signatures diff --git a/searxng_extra/update/update_locales.py b/searxng_extra/update/update_locales.py index 4b8f6222c..04abaecda 100755 --- a/searxng_extra/update/update_locales.py +++ b/searxng_extra/update/update_locales.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later """Update locale names in :origin:`searx/data/locales.json` used by :ref:`searx.locales` diff --git a/searxng_extra/update/update_osm_keys_tags.py b/searxng_extra/update/update_osm_keys_tags.py index d350756ec..2c4f5897f 100755 --- a/searxng_extra/update/update_osm_keys_tags.py +++ b/searxng_extra/update/update_osm_keys_tags.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later """Fetch OSM keys and tags. diff --git a/searxng_extra/update/update_pygments.py b/searxng_extra/update/update_pygments.py index 5d11b28dc..7c043af7b 100755 --- a/searxng_extra/update/update_pygments.py +++ b/searxng_extra/update/update_pygments.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# lint: pylint # SPDX-License-Identifier: AGPL-3.0-or-later """Update pygments style diff --git a/searxng_extra/update/update_wikidata_units.py b/searxng_extra/update/update_wikidata_units.py index 6a7ceb1b8..a1a3731fc 100755 --- a/searxng_extra/update/update_wikidata_units.py +++ b/searxng_extra/update/update_wikidata_units.py @@ -1,8 +1,5 @@ #!/usr/bin/env python # SPDX-License-Identifier: AGPL-3.0-or-later -# lint: pylint -# pylint: disable=missing-module-docstring - """Fetch units from :origin:`searx/engines/wikidata.py` engine. Output file: :origin:`searx/data/wikidata_units.json` (:origin:`CI Update data |