[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

@@ -78,7 +78,7 @@ time_range_dict = {'day': '24h', 'week': '1w', 'month': '1m', 'year': '1y'}
base_url = "https://www.chinaso.com"
def init(_):
def setup(_: dict[str, t.Any]) -> bool | None:
if chinaso_news_source not in t.get_args(ChinasoNewsSourceType):
raise ValueError(f"Unsupported news source: {chinaso_news_source}")