summaryrefslogtreecommitdiff
path: root/searx/enginelib/traits.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/enginelib/traits.py')
-rw-r--r--searx/enginelib/traits.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/enginelib/traits.py b/searx/enginelib/traits.py
index ae27d46f1..8a7356ce2 100644
--- a/searx/enginelib/traits.py
+++ b/searx/enginelib/traits.py
@@ -13,6 +13,7 @@ used.
from __future__ import annotations
import json
import dataclasses
+import types
from typing import Dict, Iterable, Union, Callable, Optional, TYPE_CHECKING
from typing_extensions import Literal, Self
@@ -82,8 +83,7 @@ class EngineTraits:
"""
custom: Dict[str, Union[Dict[str, Dict], Iterable[str]]] = dataclasses.field(default_factory=dict)
- """A place to store engine's custom traits, not related to the SearXNG core
-
+ """A place to store engine's custom traits, not related to the SearXNG core.
"""
def get_language(self, searxng_locale: str, default=None):
@@ -228,7 +228,7 @@ class EngineTraitsMap(Dict[str, EngineTraits]):
return obj
- def set_traits(self, engine: Engine):
+ def set_traits(self, engine: Engine | types.ModuleType):
"""Set traits in a :py:obj:`Engine` namespace.
:param engine: engine instance build by :py:func:`searx.engines.load_engine`