diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2026-06-14 15:16:26 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2026-06-15 10:52:00 +0200 |
| commit | 6c9dcd42420cee087ad7fe3d686dfc2b632ebbee (patch) | |
| tree | 27031bc2bbb57a2eb9596bb6d5f588bd9a2db0e3 /searx/search | |
| parent | b3e08f2a44640ffc45d5955f5ff43b4a4d555578 (diff) | |
[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>
Diffstat (limited to 'searx/search')
| -rw-r--r-- | searx/search/processors/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/searx/search/processors/__init__.py b/searx/search/processors/__init__.py index 1c9e0be3c..f7900d284 100644 --- a/searx/search/processors/__init__.py +++ b/searx/search/processors/__init__.py @@ -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 |
