From 8769b7c6d6d62b961d62b9454bd12f69fba298c8 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 5 Mar 2025 17:29:20 +0100 Subject: [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 --- searx/enginelib/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'searx/enginelib') 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 `).""" -- cgit v1.2.3