From 5c1e41bb552bbbaef961a0de6ec443d3965cb8e1 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 24 May 2024 13:38:26 -0600 Subject: [PATCH] Linting --- src/registrar/admin.py | 3 +++ src/registrar/models/waffle_switch.py | 2 +- src/registrar/utility/email.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index b79dafddc..4f1c52d2e 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -2309,6 +2309,7 @@ class UserGroupAdmin(AuditedAdmin): class WaffleFlagAdmin(FlagAdmin): """Custom admin implementation of django-waffle's Flag class""" + class Meta: """Contains meta information about this class""" @@ -2318,12 +2319,14 @@ class WaffleFlagAdmin(FlagAdmin): class WaffleSwitchAdmin(SwitchAdmin): """Custom admin implementation of django-waffle's Switch class""" + class Meta: """Contains meta information about this class""" model = models.WaffleSwitch fields = "__all__" + admin.site.unregister(LogEntry) # Unregister the default registration admin.site.register(LogEntry, CustomLogEntryAdmin) diff --git a/src/registrar/models/waffle_switch.py b/src/registrar/models/waffle_switch.py index 6532225a5..7fc117342 100644 --- a/src/registrar/models/waffle_switch.py +++ b/src/registrar/models/waffle_switch.py @@ -15,4 +15,4 @@ class WaffleSwitch(AbstractBaseSwitch): """Contains meta information about this class""" verbose_name = "waffle switch" - verbose_name_plural = "Waffle switches" \ No newline at end of file + verbose_name_plural = "Waffle switches" diff --git a/src/registrar/utility/email.py b/src/registrar/utility/email.py index cdbce0f24..ed121114a 100644 --- a/src/registrar/utility/email.py +++ b/src/registrar/utility/email.py @@ -9,7 +9,6 @@ from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from waffle import switch_is_active -from django.conf import settings logger = logging.getLogger(__name__) @@ -38,7 +37,8 @@ def send_templated_email( Raises EmailSendingError if SES client could not be accessed """ if switch_is_active("disable_email_sending") and not settings.IS_PRODUCTION: - raise EmailSendingError("Could not send email. Email sending is disabled due to switch 'disable_email_sending'.") + message = "Could not send email. Email sending is disabled due to switch 'disable_email_sending'." + raise EmailSendingError(message) template = get_template(template_name) email_body = template.render(context=context)