Add invoke as task runner, ruff and fix mypy errors
This commit is contained in:
@@ -39,11 +39,11 @@ TERMINAL = "aws4_request"
|
||||
VERSION = 0x04
|
||||
|
||||
|
||||
def sign(key, msg):
|
||||
def sign(key: bytes, msg: str) -> bytes:
|
||||
return hmac.new(key, msg.encode("utf-8"), hashlib.sha256).digest()
|
||||
|
||||
|
||||
def calculate_key(secret_access_key):
|
||||
def calculate_key(secret_access_key: str) -> str:
|
||||
signature = sign(("AWS4" + secret_access_key).encode("utf-8"), DATE)
|
||||
signature = sign(signature, REGION)
|
||||
signature = sign(signature, SERVICE)
|
||||
@@ -54,7 +54,7 @@ def calculate_key(secret_access_key):
|
||||
return smtp_password.decode("utf-8")
|
||||
|
||||
|
||||
def main():
|
||||
def main() -> None:
|
||||
if sys.version_info[0] < 3:
|
||||
raise Exception("Must be using Python 3")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user