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 15f4d7092..4910b1b85 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -66,7 +66,7 @@ def searx_useragent() -> str:
).strip()
-def gen_useragent(os_string: str = None) -> str:
+def gen_useragent(os_string: Optional[str] = None) -> str:
"""Return a random browser User Agent
See searx/data/useragents.json
@@ -570,7 +570,7 @@ def eval_xpath(element: ElementBase, xpath_spec: XPathSpecType):
raise SearxEngineXPathException(xpath_spec, arg) from e
-def eval_xpath_list(element: ElementBase, xpath_spec: XPathSpecType, min_len: int = None):
+def eval_xpath_list(element: ElementBase, xpath_spec: XPathSpecType, min_len: Optional[int] = None):
"""Same as eval_xpath, check if the result is a list
Args: