diff options
| author | Martin Fischer <martin@push-f.com> | 2022-01-24 09:46:32 +0100 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2022-01-27 22:07:12 +0100 |
| commit | 640c404844e3b06482402c53fdce8a2295772d42 (patch) | |
| tree | 773c7f309634d29e4260b96f07840cea4fee19b3 /searx/shared/shared_simple.py | |
| parent | 8aef66b365b5faeb42362e2da7fdf93517136d88 (diff) | |
[pyright:strict] searx.search.checker.background
Diffstat (limited to 'searx/shared/shared_simple.py')
| -rw-r--r-- | searx/shared/shared_simple.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/searx/shared/shared_simple.py b/searx/shared/shared_simple.py index 0bf13a2a6..2b9d4c2da 100644 --- a/searx/shared/shared_simple.py +++ b/searx/shared/shared_simple.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later import threading +from typing import Optional from . import shared_abstract @@ -12,16 +13,16 @@ class SimpleSharedDict(shared_abstract.SharedDict): def __init__(self): self.d = {} - def get_int(self, key): + def get_int(self, key: str) -> Optional[int]: return self.d.get(key, None) - def set_int(self, key, value): + def set_int(self, key: str, value: int): self.d[key] = value - def get_str(self, key): + def get_str(self, key: str) -> Optional[str]: return self.d.get(key, None) - def set_str(self, key, value): + def set_str(self, key: str, value: str): self.d[key] = value |