summaryrefslogtreecommitdiff
path: root/searx/engines/senscritique.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/senscritique.py')
-rw-r--r--searx/engines/senscritique.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/searx/engines/senscritique.py b/searx/engines/senscritique.py
index 3abd7d358..cf1765624 100644
--- a/searx/engines/senscritique.py
+++ b/searx/engines/senscritique.py
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""SensCritique (movies)
"""
-from __future__ import annotations
+
+import typing as t
from json import dumps, loads
-from typing import Any, Optional
from searx.result_types import EngineResults, MainResult
about = {
@@ -61,7 +61,7 @@ graphql_query = """query SearchProductExplorer($query: String, $offset: Int, $li
}"""
-def request(query: str, params: dict[str, Any]) -> dict[str, Any]:
+def request(query: str, params: dict[str, t.Any]) -> dict[str, t.Any]:
offset = (params['pageno'] - 1) * page_size
data = {
@@ -95,7 +95,7 @@ def response(resp) -> EngineResults:
return res
-def parse_item(item: dict[str, Any]) -> MainResult | None:
+def parse_item(item: dict[str, t.Any]) -> MainResult | None:
"""Parse a single item from the SensCritique API response"""
title = item.get('title', '')
if not title:
@@ -118,7 +118,7 @@ def parse_item(item: dict[str, Any]) -> MainResult | None:
)
-def build_content_parts(item: dict[str, Any], title: str, original_title: Optional[str]) -> list[str]:
+def build_content_parts(item: dict[str, t.Any], title: str, original_title: str | None) -> list[str]:
"""Build the content parts for an item"""
content_parts = []