diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2025-03-05 17:29:20 +0100 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2025-03-15 10:36:33 +0100 |
| commit | 8769b7c6d6d62b961d62b9454bd12f69fba298c8 (patch) | |
| tree | bdf58284b785169606060acc257db5c1e828b430 /searx/enginelib/__init__.py | |
| parent | d6ce29f7f05a2ff49e1b8566d49b9ca21c30936a (diff) | |
[refactor] typification of SearXNG (MainResult) / result items (part 2)
The class ReslutContainer has been revised, it can now handle the typed Result
items of classes:
- MainResult
- LegacyResult (a dict wrapper for backward compatibility)
Due to the now complete typing of theses three clases, instead of the *getitem*
accesses, the fields can now be accessed directly via attributes (which is also
supported by the IDE).
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/enginelib/__init__.py')
| -rw-r--r-- | searx/enginelib/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/enginelib/__init__.py b/searx/enginelib/__init__.py index 6e6c24cb7..aef49e0c3 100644 --- a/searx/enginelib/__init__.py +++ b/searx/enginelib/__init__.py @@ -142,3 +142,6 @@ class Engine: # pylint: disable=too-few-public-methods tokens: List[str] """A list of secret tokens to make this engine *private*, more details see :ref:`private engines`.""" + + weight: int + """Weighting of the results of this engine (:ref:`weight <settings engines>`).""" |