|
@@ -1,20 +1,22 @@
|
|
|
|
|
|
+
|
|
|
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
|