[mod] engines: migrate to setup() from init() for simple tasks

This commit is contained in:
Om Alve
2026-08-23 18:26:13 +05:30
committed by Bnyro
parent fd29de6c55
commit b4f616fed7
44 changed files with 87 additions and 66 deletions

View File

@@ -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():