4 Commits

Author SHA1 Message Date
Markus Heiser
77068ce20b [upd] pypi: Bump sphinx from 7.4.7 to 8.2.3 (#5252)
- supersede: https://github.com/searxng/searxng/pull/4377

Sphinx 8.2 dropped Python 3.10 support, last versions supporting Python 3.10:

- Sphinx==8.1.3
- sphinx-autobuild==2024.10.3

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-26 16:57:01 +02:00
Markus Heiser
81cbe0befe [upd] pypi: Bump black from 24.3.0 to 25.9.0 (#5251)
In 25.1.0 [2] an old bug has been fixed: "Docstring formatting does not apply to
module docstrings" [3].

[1] https://github.com/psf/black/blob/main/CHANGES.md#2590
[2] https://github.com/psf/black/blob/main/CHANGES.md#2510
[3] https://github.com/psf/black/issues/4094

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-26 12:35:57 +02:00
dependabot[bot]
1091643f32 [upd] github-actions: Bump actions/cache from 4.2.4 to 4.3.0 (#5249)
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.4 to 4.3.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](0400d5f644...0057852bfa)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 10:46:19 +02:00
dependabot[bot]
899ae9a6e4 [upd] pypi: Bump myst-parser from 3.0.1 to 4.0.0 (#3719)
Bumps [myst-parser](https://github.com/executablebooks/MyST-Parser) from 3.0.1 to 4.0.0.
- [Release notes](https://github.com/executablebooks/MyST-Parser/releases)
- [Changelog](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/MyST-Parser/compare/v3.0.1...v4.0.0)

---
updated-dependencies:
- dependency-name: myst-parser
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 10:32:01 +02:00
83 changed files with 101 additions and 186 deletions

View File

@@ -34,7 +34,7 @@ jobs:
persist-credentials: "false"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"

View File

@@ -50,7 +50,7 @@ jobs:
- if: github.repository_owner == 'searxng'
name: Check cache apko
id: cache-apko
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
# yamllint disable-line rule:line-length
key: "apko-${{ steps.date.outputs.date }}-${{ hashFiles('./container/base.yml', './container/base-builder.yml') }}"
@@ -59,7 +59,7 @@ jobs:
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Setup cache apko
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
# yamllint disable-line rule:line-length
key: "apko-${{ steps.date.outputs.date }}-${{ hashFiles('./container/base.yml', './container/base-builder.yml') }}"
@@ -137,14 +137,14 @@ jobs:
fetch-depth: "0"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup cache container uv
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "container-uv-${{ matrix.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "container-uv-${{ matrix.arch }}-"

View File

@@ -50,7 +50,7 @@ jobs:
persist-credentials: "false"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"

View File

@@ -43,7 +43,7 @@ jobs:
fetch-depth: "0"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"

View File

@@ -46,7 +46,7 @@ jobs:
persist-credentials: "false"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ matrix.python-version }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ matrix.python-version }}-${{ runner.arch }}-"
@@ -79,13 +79,13 @@ jobs:
node-version-file: "./.nvmrc"
- name: Setup cache Node.js
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "nodejs-${{ runner.arch }}-${{ hashFiles('./.nvmrc', './package.json') }}"
path: "./client/simple/node_modules/"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"

View File

@@ -46,7 +46,7 @@ jobs:
fetch-depth: "0"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
@@ -93,7 +93,7 @@ jobs:
fetch-depth: "0"
- name: Setup cache Python
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"

View File

@@ -1,19 +1,21 @@
mock==5.2.0
nose2[coverage_plugin]==0.15.1
cov-core==1.15.0
black==24.3.0
black==25.9.0
pylint==3.3.8
splinter==0.21.0
selenium==4.35.0
Pallets-Sphinx-Themes==2.3.0
Sphinx==7.4.7
Sphinx==8.2.3 ; python_version >= '3.11'
Sphinx==8.1.3 ; python_version < '3.11'
sphinx-issues==5.0.1
sphinx-jinja==2.0.2
sphinx-tabs==3.4.7
sphinxcontrib-programoutput==0.18
sphinx-autobuild==2024.10.3
sphinx-autobuild==2025.8.25 ; python_version >= '3.11'
sphinx-autobuild==2024.10.3 ; python_version < '3.11'
sphinx-notfound-page==1.1.0
myst-parser==3.0.1
myst-parser==4.0.1
linuxdoc==20240924
aiounittest==1.5.0
yamllint==1.37.1

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""This module implements functions needed for the autocompleter.
"""
"""This module implements functions needed for the autocompleter."""
# pylint: disable=use-dict-literal
import json

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""This module holds the *data* created by::
make data.all
make data.all
"""
# pylint: disable=invalid-name

View File

@@ -1,8 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=invalid-name
"""1337x
"""
"""1337x"""
from urllib.parse import quote, urljoin
from lxml import html

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Ahmia (Onions)
Ahmia (Onions)
"""
from urllib.parse import urlencode, urlparse, parse_qs

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""APKMirror
"""
"""APKMirror"""
# pylint: disable=invalid-name

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Apple App Store
"""
"""Apple App Store"""
from json import loads
from urllib.parse import urlencode

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""BASE (Scholar publications)
"""
"""BASE (Scholar publications)"""
from datetime import datetime
import re

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Bing-Images: description see :py:obj:`searx.engines.bing`.
"""
"""Bing-Images: description see :py:obj:`searx.engines.bing`."""
# pylint: disable=invalid-name
import json
from urllib.parse import urlencode

View File

@@ -1,7 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=invalid-name
"""Bing-Videos: description see :py:obj:`searx.engines.bing`.
"""
"""Bing-Videos: description see :py:obj:`searx.engines.bing`."""
import json
from urllib.parse import urlencode

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
BTDigg (Videos, Music, Files)
BTDigg (Videos, Music, Files)
"""
from urllib.parse import quote, urljoin

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Chefkoch is a German database of recipes.
"""
"""Chefkoch is a German database of recipes."""
from datetime import datetime
from urllib.parse import urlencode

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Cppreference
"""
"""Cppreference"""
from lxml import html
from searx.utils import eval_xpath

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Deezer (Music)
Deezer (Music)
"""
from json import loads

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""DeStatis
"""
"""DeStatis"""
from urllib.parse import urlencode
from lxml import html

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Deviantart (Images)
"""
"""Deviantart (Images)"""
import urllib.parse
from lxml import html

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Dictzone
Dictzone
"""
import urllib.parse

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
DigBT (Videos, Music, Files)
DigBT (Videos, Music, Files)
"""
from urllib.parse import urljoin

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Docker Hub (IT)
"""
"""Docker Hub (IT)"""
# pylint: disable=use-dict-literal
from urllib.parse import urlencode

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Doku Wiki
Doku Wiki
"""
from urllib.parse import urlencode

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Duden
"""
"""Duden"""
import re
from urllib.parse import quote, urljoin

View File

@@ -1,8 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=invalid-name
"""Dummy Offline
"""
"""Dummy Offline"""
# about

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Dummy
"""
"""Dummy"""
# about
about = {

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Ebay (Videos, Music, Files)
Ebay (Videos, Music, Files)
"""
from urllib.parse import quote

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
F-Droid (a repository of FOSS applications for Android)
F-Droid (a repository of FOSS applications for Android)
"""
from urllib.parse import urlencode

View File

@@ -1,8 +1,8 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Flickr (Images)
Flickr (Images)
More info on api-key : https://www.flickr.com/services/apps/create/
More info on api-key : https://www.flickr.com/services/apps/create/
"""
from json import loads

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Flickr (Images)
"""
"""Flickr (Images)"""
import json
from time import time

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Frinkiac (Images)
Frinkiac (Images)
"""
from json import loads

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Fyyd (podcasts)
"""
"""Fyyd (podcasts)"""
from datetime import datetime
from urllib.parse import urlencode

View File

@@ -1,8 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=invalid-name
"""Genius
"""
"""Genius"""
from urllib.parse import urlencode
from datetime import datetime

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Github (IT)
"""
"""Github (IT)"""
from urllib.parse import urlencode
from dateutil import parser

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Goodreads (books)
"""
"""Goodreads (books)"""
from urllib.parse import urlencode

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Google Play Apps & Google Play Movies
"""
"""Google Play Apps & Google Play Movies"""
from urllib.parse import urlencode
from lxml import html

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Hackernews
"""
"""Hackernews"""
from datetime import datetime
from urllib.parse import urlencode

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Imgur (images)
"""
"""Imgur (images)"""
from urllib.parse import urlencode
from lxml import html

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
INA (Videos)
INA (Videos)
"""
from html import unescape

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""MediathekViewWeb (API)
"""
"""MediathekViewWeb (API)"""
import datetime
from json import loads, dumps

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""metacpan
"""
"""metacpan"""
from urllib.parse import urlunparse

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Mixcloud (Music)
"""
"""Mixcloud (Music)"""
from urllib.parse import urlencode
from dateutil import parser

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""npms.io
"""
"""npms.io"""
from urllib.parse import urlencode
from dateutil import parser

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Nyaa.si (Anime Bittorrent tracker)
"""
"""Nyaa.si (Anime Bittorrent tracker)"""
from urllib.parse import urlencode

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Open Semantic Search
"""
"""Open Semantic Search"""
from json import loads
from urllib.parse import quote

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""OpenStreetMap (Map)
"""
"""OpenStreetMap (Map)"""
import re
import urllib.parse

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Openverse (formerly known as: Creative Commons search engine) [Images]
Openverse (formerly known as: Creative Commons search engine) [Images]
"""

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
PDBe (Protein Data Bank in Europe)
PDBe (Protein Data Bank in Europe)
"""
from json import loads

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Photon (Map)
Photon (Map)
"""
from json import loads

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Piratebay (Videos, Music, Files)
Piratebay (Videos, Music, Files)
"""
from json import loads

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Podcast Index
"""
"""Podcast Index"""
from urllib.parse import quote_plus
from datetime import datetime

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""pypi.org
"""
"""pypi.org"""
from urllib.parse import urlencode
from dateutil import parser

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Reddit
"""
"""Reddit"""
import json
from datetime import datetime

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""RottenTomatoes (movies)
"""
"""RottenTomatoes (movies)"""
from urllib.parse import quote_plus
from lxml import html

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Rumble (Videos)
"""
"""Rumble (Videos)"""
from datetime import datetime

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
ScanR Structures (Science)
ScanR Structures (Science)
"""
from json import loads, dumps

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Searx (all)
Searx (all)
"""
from json import loads

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""SensCritique (movies)
"""
"""SensCritique (movies)"""
import typing as t

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Seznam
"""
"""Seznam"""
from urllib.parse import urlencode
from lxml import html

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""SolidTorrents
"""
"""SolidTorrents"""
from datetime import datetime
from urllib.parse import urlencode

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Spotify (Music)
"""
"""Spotify (Music)"""
from json import loads
from urllib.parse import urlencode

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Svgrepo (icons)
"""
"""Svgrepo (icons)"""
from lxml import html
from searx.utils import extract_text, eval_xpath, eval_xpath_list

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Tokyo Toshokan (A BitTorrent Library for Japanese Media)
"""
"""Tokyo Toshokan (A BitTorrent Library for Japanese Media)"""
import re
from datetime import datetime

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Tootfinder (social media)
"""
"""Tootfinder (social media)"""
from datetime import datetime
from json import loads

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""MyMemory Translated
"""
"""MyMemory Translated"""
import urllib.parse

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Unsplash
"""
"""Unsplash"""
from urllib.parse import urlencode, urlparse, urlunparse, parse_qsl
from json import loads

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Wikipedia (Web
Wikipedia (Web
"""
from urllib.parse import urlencode

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Wikimedia Commons (images)
"""
"""Wikimedia Commons (images)"""
import datetime

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Wolfram|Alpha (Science)
"""
"""Wolfram|Alpha (Science)"""
from urllib.parse import urlencode

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Wolfram|Alpha (Science)
Wolfram|Alpha (Science)
"""

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""1x (Images)
"""
"""1x (Images)"""
from urllib.parse import urlencode, urljoin
from lxml import html, etree

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Yep (general, images, news)
"""
"""Yep (general, images, news)"""
from datetime import datetime
from urllib.parse import urlencode

View File

@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Youtube (Videos)
Youtube (Videos)
"""
from json import loads

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Youtube (Videos)
"""
"""Youtube (Videos)"""
from functools import reduce
from json import loads, dumps

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Exception types raised by SearXNG modules.
"""
"""Exception types raised by SearXNG modules."""
import typing as t
from lxml.etree import XPath

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Raise exception for an HTTP response is an error.
"""
"""Raise exception for an HTTP response is an error."""
import typing as t
from searx.exceptions import (

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Searx preferences implementation.
"""
"""Searx preferences implementation."""
# pylint: disable=useless-object-inheritance

View File

@@ -1,7 +1,6 @@
# -*- mode: python -*-
# SPDX-License-Identifier: AGPL-3.0-or-later
"""A SearXNG message file, see :py:obj:`searx.babel`
"""
"""A SearXNG message file, see :py:obj:`searx.babel`"""
import typing

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Implementation of the default settings.
"""
"""Implementation of the default settings."""
from __future__ import annotations
import typing as t

View File

@@ -50,7 +50,7 @@ A list of five-digit tuples:
Empty string for language tags.
3. English language name (from :py:obj:`babel.core.Locale.english_name`)
4. Unicode flag (emoji) that fits to SearXNG's internal region tag. Languages
are represented by a globe (\U0001F310)
are represented by a globe (\U0001f310)
.. code:: python
@@ -68,11 +68,11 @@ A list of five-digit tuples:
lang2emoji = {
'ha': '\U0001F1F3\U0001F1EA', # Hausa / Niger
'bs': '\U0001F1E7\U0001F1E6', # Bosnian / Bosnia & Herzegovina
'jp': '\U0001F1EF\U0001F1F5', # Japanese
'ua': '\U0001F1FA\U0001F1E6', # Ukrainian
'he': '\U0001F1EE\U0001F1F1', # Hebrew
'ha': '\U0001f1f3\U0001f1ea', # Hausa / Niger
'bs': '\U0001f1e7\U0001f1e6', # Bosnian / Bosnia & Herzegovina
'jp': '\U0001f1ef\U0001f1f5', # Japanese
'ua': '\U0001f1fa\U0001f1e6', # Ukrainian
'he': '\U0001f1ee\U0001f1f1', # Hebrew
}
@@ -178,7 +178,7 @@ def get_unicode_flag(locale: babel.Locale):
return emoji
if not locale.territory:
return '\U0001F310'
return '\U0001f310'
emoji = lang2emoji.get(locale.territory.lower())
if emoji: