From 55f7404763f733ba8d759f7f2e2e0d1dccb1ddf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20de=20Matteo?= Date: Tue, 17 Jun 2025 16:48:10 -0300 Subject: [PATCH] #21010 --- api/configs/feature/__init__.py | 1 + api/libs/sendgrid.py | 11 ++++------- api/mypy.ini | 1 - 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.py index b3f454cd50..df15b92c35 100644 --- a/api/configs/feature/__init__.py +++ b/api/configs/feature/__init__.py @@ -668,6 +668,7 @@ class MailConfig(BaseSettings): default=None, ) + class RagEtlConfig(BaseSettings): """ Configuration for RAG ETL processes diff --git a/api/libs/sendgrid.py b/api/libs/sendgrid.py index 630732b0e8..6217e9f4a6 100644 --- a/api/libs/sendgrid.py +++ b/api/libs/sendgrid.py @@ -1,15 +1,12 @@ import logging -import sendgrid +import sendgrid # type: ignore from python_http_client.exceptions import ForbiddenError, UnauthorizedError -from sendgrid.helpers.mail import Content, Email, Mail, To +from sendgrid.helpers.mail import Content, Email, Mail, To # type: ignore class SendGridClient: - def __init__( - self, sendgrid_api_key: str,_from: str - ): - + def __init__(self, sendgrid_api_key: str, _from: str): self.sendgrid_api_key = sendgrid_api_key self._from = _from @@ -28,7 +25,7 @@ class SendGridClient: subject = mail["subject"] content = Content("text/html", mail["html"]) mail = Mail(from_email, to_email, subject, content) - mail_json = mail.get() + mail_json = mail.get() # type: ignore response = sg.client.mail.send.post(request_body=mail_json) logging.debug(response.status_code) logging.debug(response.body) diff --git a/api/mypy.ini b/api/mypy.ini index 12fe529b08..6836b2602b 100644 --- a/api/mypy.ini +++ b/api/mypy.ini @@ -18,4 +18,3 @@ ignore_missing_imports=True [mypy-flask_restful.inputs] ignore_missing_imports=True -