mirror of
https://github.com/searxng/searxng.git
synced 2026-09-03 04:51:24 +00:00
[mod] engines: migrate to setup() from init() for simple tasks
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Wolfram|Alpha (Science)
|
||||
"""
|
||||
|
||||
|
||||
import typing as t
|
||||
from json import loads
|
||||
from urllib.parse import urlencode
|
||||
|
||||
@@ -51,7 +51,7 @@ CACHE: EngineCache
|
||||
seconds."""
|
||||
|
||||
|
||||
def init(engine_settings):
|
||||
def setup(engine_settings: dict[str, t.Any]) -> bool | None:
|
||||
global CACHE # pylint: disable=global-statement
|
||||
CACHE = EngineCache(engine_settings["name"]) # type:ignore
|
||||
|
||||
|
||||
Reference in New Issue
Block a user