summaryrefslogtreecommitdiff
path: root/searx/engines/huggingface.py
diff options
context:
space:
mode:
authorOm Alve <om@turboml.com>2026-08-23 18:26:13 +0530
committerBnyro <bnyro@tutanota.com>2026-09-02 16:30:00 +0200
commitb4f616fed70b0598a1817fb828c0cce29d0451be (patch)
treeb0133d0ea0d822b1e907983eb5ac8102ab51ff79 /searx/engines/huggingface.py
parentfd29de6c55e81524172744d9f36917c271dd01b9 (diff)
[mod] engines: migrate to setup() from init() for simple tasks
Diffstat (limited to 'searx/engines/huggingface.py')
-rw-r--r--searx/engines/huggingface.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/engines/huggingface.py b/searx/engines/huggingface.py
index 908eb2052..6fcf2b889 100644
--- a/searx/engines/huggingface.py
+++ b/searx/engines/huggingface.py
@@ -33,6 +33,7 @@ Implementations
"""
+import typing as t
from urllib.parse import urlencode
from datetime import datetime
@@ -62,7 +63,7 @@ huggingface_endpoint = 'models'
"""
-def init(_):
+def setup(_: dict[str, t.Any]) -> bool | None:
if huggingface_endpoint not in ('datasets', 'models', 'spaces'):
raise SearxEngineAPIException(f"Unsupported Hugging Face endpoint: {huggingface_endpoint}")