mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
[pyright:strict] searx.shared.shared_abstract
This commit is contained in:
parent
1b03db4c73
commit
7f89adc5f3
@ -1,20 +1,22 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
# pyright: strict
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
|
||||||
class SharedDict(ABC):
|
class SharedDict(ABC):
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_int(self, key):
|
def get_int(self, key: str) -> Optional[int]:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def set_int(self, key, value):
|
def set_int(self, key: str, value: int):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_str(self, key):
|
def get_str(self, key: str) -> Optional[str]:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def set_str(self, key, value):
|
def set_str(self, key: str, value: str):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user