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:
@@ -38,6 +38,7 @@ Implementation
|
||||
|
||||
"""
|
||||
|
||||
import typing as t
|
||||
from urllib.parse import urlencode
|
||||
from dateutil import parser
|
||||
|
||||
@@ -77,7 +78,7 @@ page_size: int = 10
|
||||
"""Maximum number of results per page (default 10)."""
|
||||
|
||||
|
||||
def init(_):
|
||||
def setup(_: dict[str, t.Any]) -> bool | None:
|
||||
if not base_url:
|
||||
raise ValueError('gitea engine: base_url is unset')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user