diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2022-07-30 18:40:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-30 18:40:16 +0200 |
| commit | 88733c0ce6e76a78593b8e4060e33a617cce3cd8 (patch) | |
| tree | d5ed9ed522b308b8d572b119da315196dd69ae87 /searx/utils.py | |
| parent | ededaab807a22abdd69a7c802cda3bb256d6ab51 (diff) | |
| parent | 2babf59adcc9576e6520337515ff150e6434ad85 (diff) | |
Merge pull request #1569 from dalf/fix-pyright-reported-errors
Fix pyright errors
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 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: |