Browse Source

[pyright:strict] searx.shared.shared_abstract

Martin Fischer 3 years ago
parent
commit
7f89adc5f3
1 changed files with 6 additions and 4 deletions
  1. 6 4
      searx/shared/shared_abstract.py

+ 6 - 4
searx/shared/shared_abstract.py

@@ -1,20 +1,22 @@
 # SPDX-License-Identifier: AGPL-3.0-or-later
+# pyright: strict
 from abc import ABC, abstractmethod
+from typing import Optional
 
 
 class SharedDict(ABC):
     @abstractmethod
-    def get_int(self, key):
+    def get_int(self, key: str) -> Optional[int]:
         pass
 
     @abstractmethod
-    def set_int(self, key, value):
+    def set_int(self, key: str, value: int):
         pass
 
     @abstractmethod
-    def get_str(self, key):
+    def get_str(self, key: str) -> Optional[str]:
         pass
 
     @abstractmethod
-    def set_str(self, key, value):
+    def set_str(self, key: str, value: str):
         pass