Skip to content

Commit

Permalink
reminder_bot: More typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ochosi committed Mar 8, 2023
1 parent 0e682c1 commit c720610
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reminder_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
from slack_sdk.webhook import WebhookClient


def load_key(keyfile):
def load_key(keyfile: str):
"""
Loads the key from the current directory named `key.key`
"""
return open(keyfile, "rb").read()


def decrypt(filename, key):
def decrypt(filename: str, key: bytes):
"""
Given a filename (str) and key (bytes), it decrypts the file and write it
Given a filename (str) and key (bytes), it decrypts the file
"""
f = Fernet(key)
with open(filename, "rb") as file:
Expand Down

0 comments on commit c720610

Please sign in to comment.