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/shared | |
| parent | ededaab807a22abdd69a7c802cda3bb256d6ab51 (diff) | |
| parent | 2babf59adcc9576e6520337515ff150e6434ad85 (diff) | |
Merge pull request #1569 from dalf/fix-pyright-reported-errors
Fix pyright errors
Diffstat (limited to 'searx/shared')
| -rw-r--r-- | searx/shared/__init__.py | 5 | ||||
| -rw-r--r-- | searx/shared/shared_uwsgi.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/searx/shared/__init__.py b/searx/shared/__init__.py index 98c9a11c2..f03679c61 100644 --- a/searx/shared/__init__.py +++ b/searx/shared/__init__.py @@ -1,11 +1,14 @@ # SPDX-License-Identifier: AGPL-3.0-or-later import logging +import importlib logger = logging.getLogger('searx.shared') +__all__ = ['SharedDict', 'schedule'] + try: - import uwsgi + uwsgi = importlib.import_module('uwsgi') except: # no uwsgi from .shared_simple import SimpleSharedDict as SharedDict, schedule diff --git a/searx/shared/shared_uwsgi.py b/searx/shared/shared_uwsgi.py index 4a6b0a155..0248c6234 100644 --- a/searx/shared/shared_uwsgi.py +++ b/searx/shared/shared_uwsgi.py @@ -2,7 +2,7 @@ import time from typing import Optional -import uwsgi # pylint: disable=E0401 +import uwsgi # pyright: ignore # pylint: disable=E0401 from . import shared_abstract |