Skip to content

Commit bd13c90

Browse files
committed
Fix typing warning and remove "type: ignore" comment
1 parent 2d160a7 commit bd13c90

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

backend/app/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pathlib import Path
55
from typing import Any
66

7-
import emails # type: ignore[import-untyped]
7+
import emails
88
import jwt
99
from jinja2 import Template
1010
from jwt.exceptions import InvalidTokenError
@@ -37,7 +37,8 @@ def send_email(
3737
html_content: str = "",
3838
) -> None:
3939
assert settings.emails_enabled, "no provided configuration for email variables"
40-
message = emails.Message(
40+
assert settings.EMAILS_FROM_EMAIL # For type checker
41+
message = emails.message.Message(
4142
subject=subject,
4243
html=html_content,
4344
mail_from=(settings.EMAILS_FROM_NAME, settings.EMAILS_FROM_EMAIL),

0 commit comments

Comments
 (0)