mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-13 09:58:31 +02:00
add more typing
This commit is contained in:
parent
e695e7a30c
commit
0466cda64f
1 changed files with 2 additions and 2 deletions
|
@ -83,13 +83,13 @@ class Journal:
|
||||||
encryption_method = determine_encryption_method(self.config["encrypt"])
|
encryption_method = determine_encryption_method(self.config["encrypt"])
|
||||||
self.encryption_method = encryption_method(self.name, self.config)
|
self.encryption_method = encryption_method(self.name, self.config)
|
||||||
|
|
||||||
def _decrypt(self, text):
|
def _decrypt(self, text: bytes) -> str:
|
||||||
if self.encryption_method is None:
|
if self.encryption_method is None:
|
||||||
self._get_encryption_method()
|
self._get_encryption_method()
|
||||||
|
|
||||||
return self.encryption_method.decrypt(text)
|
return self.encryption_method.decrypt(text)
|
||||||
|
|
||||||
def _encrypt(self, text):
|
def _encrypt(self, text: str) -> bytes:
|
||||||
if self.encryption_method is None:
|
if self.encryption_method is None:
|
||||||
self._get_encryption_method()
|
self._get_encryption_method()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue