Compare commits

..

2 Commits

Author SHA1 Message Date
Markus Heiser 2ca62fec33
Merge pull request #1784 from return42/fix-locale-doc
[fix] and improve docs generated from source code.
2022-09-18 15:26:56 +02:00
Markus Heiser fbf07237ff [fix] and improve docs generated from source code.
Fix::

    searx/locales.py:docstring of searx.locales.get_engine_locale:17: \
      WARNING: Definition list ends without a blank line; unexpected unindent.

Improvement: don't show default values in the generated documentation whe it is
more a mess than a usefull information (`:meta hide-value:`).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-09-18 12:44:12 +02:00
2 changed files with 6 additions and 2 deletions

View File

@ -81,6 +81,7 @@ engine_shortcuts = {}
engine_shortcuts[engine.shortcut] = engine.name engine_shortcuts[engine.shortcut] = engine.name
:meta hide-value:
""" """

View File

@ -25,7 +25,10 @@ _flask_babel_get_translations = flask_babel.get_translations
LOCALE_NAMES = {} LOCALE_NAMES = {}
"""Mapping of locales and their description. Locales e.g. 'fr' or 'pt-BR' (see """Mapping of locales and their description. Locales e.g. 'fr' or 'pt-BR' (see
:py:obj:`locales_initialize`).""" :py:obj:`locales_initialize`).
:meta hide-value:
"""
RTL_LOCALES: Set[str] = set() RTL_LOCALES: Set[str] = set()
"""List of *Right-To-Left* locales e.g. 'he' or 'fa-IR' (see """List of *Right-To-Left* locales e.g. 'he' or 'fa-IR' (see
@ -159,7 +162,7 @@ def get_engine_locale(searxng_locale, engine_locales, default=None):
``searxng_locale``. ``searxng_locale``.
Argument ``engine_locales`` is a python dict that maps *SearXNG locales* to Argument ``engine_locales`` is a python dict that maps *SearXNG locales* to
corresponding *engine locales*: corresponding *engine locales*::
<engine>: { <engine>: {
# SearXNG string : engine-string # SearXNG string : engine-string