Add invoke as task runner, ruff and fix mypy errors
This commit is contained in:
@@ -16,11 +16,11 @@ import sys
|
||||
from email.message import EmailMessage
|
||||
|
||||
|
||||
def send_test_email(login, password, to_email):
|
||||
def send_test_email(login: str, password: str, to_email: str) -> None:
|
||||
"""Отправляет тестовое email через Yandex Cloud Postbox SMTP"""
|
||||
|
||||
# initialize connection to our email server
|
||||
smtp = smtplib.SMTP("postbox.cloud.yandex.net", port="587")
|
||||
smtp = smtplib.SMTP("postbox.cloud.yandex.net", port=587)
|
||||
|
||||
smtp.set_debuglevel(2)
|
||||
|
||||
@@ -43,7 +43,7 @@ def send_test_email(login, password, to_email):
|
||||
print(f"Test email successfully sent to {to_email}")
|
||||
|
||||
|
||||
def main():
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Send a test email via Yandex Cloud Postbox SMTP server."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user