diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2025-11-20 18:35:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-20 18:35:43 +0100 |
| commit | b299386d3e67f49c1948e6e98d82b6d54d639dba (patch) | |
| tree | bdea35a60f3e7c7822b03401d151d38b13edcaa4 /searx/utils.py | |
| parent | 21a4622f23a2f1138125dd1dc8b5483874b4ae0f (diff) | |
[fix] minor type hint issues (#5459)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/utils.py')
| -rw-r--r-- | searx/utils.py | 4 |
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: |