diff --git a/jrnl/encryption/BaseEncryption.py b/jrnl/encryption/BaseEncryption.py index 882c6cad..8e7ed466 100644 --- a/jrnl/encryption/BaseEncryption.py +++ b/jrnl/encryption/BaseEncryption.py @@ -10,14 +10,10 @@ from jrnl.messages import MsgText class BaseEncryption(ABC): - _encoding: str - _journal_name: str - _config: dict - def __init__(self, journal_name: str, config: dict): - self._encoding = "utf-8" - self._journal_name = journal_name - self._config = config + self._encoding: str = "utf-8" + self._journal_name: str = journal_name + self._config: dict = config def encrypt(self, text: str) -> str: return self._encrypt(text) diff --git a/jrnl/encryption/BasePasswordEncryption.py b/jrnl/encryption/BasePasswordEncryption.py index af0ba88d..9485fb46 100644 --- a/jrnl/encryption/BasePasswordEncryption.py +++ b/jrnl/encryption/BasePasswordEncryption.py @@ -7,15 +7,11 @@ from jrnl.prompt import prompt_password class BasePasswordEncryption(BaseEncryption): - _attempts: int - _max_attempts: int - _password: str - def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) - self._attempts = 0 - self._max_attempts = 3 - self._password = "" + self._attempts: int = 0 + self._max_attempts: int = 3 + self._password: str = "" # Check keyring first for password. # That way we'll have it.