[chore] complete and normalize the attributes of engine objects (#6258)

Drop outdated engine attributes: supported_languages, language_aliases

Complete, normalize and document the type definitions for the engine-module and
engine-class.

For the ``engine.about`` section of the configuration, a type check is performed
based on structure ``searx.enginelib.EngineAbout``.

The property ``engine.about.language`` no longer exists; existing values have
been migrated to ``engine.language``.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2026-06-14 15:16:26 +02:00
committed by Markus Heiser
parent b3e08f2a44
commit 6c9dcd4242
45 changed files with 210 additions and 159 deletions
+9
View File
@@ -11,6 +11,7 @@ __all__ = [
"PROCESSORS",
"ParamTypes",
"RequestParams",
"ProcessorType",
]
import typing as t
@@ -27,6 +28,14 @@ from .online_url_search import OnlineUrlSearchProcessor, OnlineUrlSearchParams
logger = logger.getChild("search.processors")
ProcessorType = t.Literal[
"offline",
"online",
"online_currency",
"online_dictionary",
"online_url_search",
]
OnlineParamTypes: t.TypeAlias = OnlineParams | OnlineDictParams | OnlineCurrenciesParams | OnlineUrlSearchParams
OfflineParamTypes: t.TypeAlias = RequestParams
ParamTypes: t.TypeAlias = OfflineParamTypes | OnlineParamTypes