summaryrefslogtreecommitdiff
path: root/searx/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/utils.py')
-rw-r--r--searx/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 7e2f4d78f..3d7d6e715 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -741,7 +741,7 @@ def detect_language(text: str, threshold: float = 0.3, only_search_languages: bo
return None
-def js_variable_to_python(js_variable: str) -> str:
+def js_variable_to_python(js_variable: str) -> t.Any:
"""Convert a javascript variable into JSON and then load the value
It does not deal with all cases, but it is good enough for now.
@@ -808,7 +808,7 @@ def js_variable_to_python(js_variable: str) -> str:
# replace the surogate character by colon
s = s.replace(chr(1), ':')
# load the JSON and return the result
- return json.loads(s) # pyright: ignore[reportAny]
+ return json.loads(s)
def parse_duration_string(duration_str: str) -> timedelta | None: