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:
@@ -2,6 +2,7 @@
|
||||
"""Pexels (images)"""
|
||||
|
||||
import re
|
||||
import typing as t
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from lxml import html
|
||||
@@ -46,9 +47,10 @@ CACHE: EngineCache
|
||||
enable_http2 = False
|
||||
|
||||
|
||||
def init(engine_settings):
|
||||
def setup(engine_settings: dict[str, t.Any]) -> bool:
|
||||
global CACHE # pylint: disable=global-statement
|
||||
CACHE = EngineCache(engine_settings["name"])
|
||||
return True
|
||||
|
||||
|
||||
def _get_secret_key():
|
||||
|
||||
Reference in New Issue
Block a user