mirror of
https://github.com/searxng/searxng.git
synced 2026-06-18 07:46:51 +02:00
[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:
committed by
Markus Heiser
parent
b3e08f2a44
commit
6c9dcd4242
@@ -24,7 +24,7 @@ import typing as t
|
||||
import json
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
from searx.enginelib import EngineCache
|
||||
from searx.enginelib import EngineCache, EngineAbout
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.search.processors import RequestParams
|
||||
@@ -35,13 +35,11 @@ categories = ["general"]
|
||||
disabled = True
|
||||
timeout = 2.0
|
||||
|
||||
about = {
|
||||
"wikidata_id": None,
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
language = "en"
|
||||
about = EngineAbout(
|
||||
results="JSON",
|
||||
description="Demo offline engine Engine with results in the English language.",
|
||||
)
|
||||
|
||||
# if there is a need for globals, use a leading underline
|
||||
_my_offline_engine: str = ""
|
||||
|
||||
Reference in New Issue
Block a user