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:
@@ -28,7 +28,7 @@ This is an example configuration for searching in the collection
|
||||
"""
|
||||
|
||||
# pylint: disable=global-statement
|
||||
|
||||
import typing as t
|
||||
from urllib.parse import urlencode
|
||||
from searx.exceptions import SearxEngineAPIException
|
||||
from searx.result_types import EngineResults
|
||||
@@ -46,7 +46,7 @@ _search_url = ''
|
||||
paging = True
|
||||
|
||||
|
||||
def init(_):
|
||||
def setup(_: dict[str, t.Any]) -> bool | None:
|
||||
if collection == '':
|
||||
raise ValueError('collection cannot be empty')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user