mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 08:19:17 +02:00
[pyright:strict] searx.search.checker.background
This commit is contained in:
parent
8aef66b365
commit
640c404844
4 changed files with 73 additions and 22 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue