shared_abstract.py 477 B

12345678910111213141516171819202122
  1. # SPDX-License-Identifier: AGPL-3.0-or-later
  2. # pyright: strict
  3. from abc import ABC, abstractmethod
  4. from typing import Optional
  5. class SharedDict(ABC):
  6. @abstractmethod
  7. def get_int(self, key: str) -> Optional[int]:
  8. pass
  9. @abstractmethod
  10. def set_int(self, key: str, value: int):
  11. pass
  12. @abstractmethod
  13. def get_str(self, key: str) -> Optional[str]:
  14. pass
  15. @abstractmethod
  16. def set_str(self, key: str, value: str):
  17. pass