Cleaning up with black, isort, flake8.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-16 07:37:21 -05:00
parent ab7387acd8
commit 9523cc1d97
28 changed files with 82 additions and 61 deletions

View File

@@ -16,7 +16,7 @@ from app.dao.notifications_dao import (
dao_create_notification,
dao_delete_notifications_by_id,
)
from app.enums import NotificationType, NotificationStatus, KeyType
from app.enums import KeyType, NotificationStatus, NotificationType
from app.models import Notification
from app.v2.errors import BadRequestError

View File

@@ -4,7 +4,7 @@ from notifications_utils import SMS_CHAR_COUNT_LIMIT
from app import api_user, authenticated_service
from app.config import QueueNames
from app.dao import notifications_dao
from app.enums import NotificationType, KeyType, TemplateProcessType
from app.enums import KeyType, NotificationType, TemplateProcessType
from app.errors import InvalidRequest, register_errors
from app.notifications.process_notifications import (
persist_notification,
@@ -136,7 +136,11 @@ def send_notification(notification_type):
reply_to_text=template.reply_to_text,
)
if not simulated:
queue_name = QueueNames.PRIORITY if template.process_type == TemplateProcessType.PRIORITY else None
queue_name = (
QueueNames.PRIORITY
if template.process_type == TemplateProcessType.PRIORITY
else None
)
send_notification_to_queue(notification=notification_model, queue=queue_name)
else:

View File

@@ -15,7 +15,7 @@ from app import redis_store
from app.dao.notifications_dao import dao_get_notification_count_for_service
from app.dao.service_email_reply_to_dao import dao_get_reply_to_by_id
from app.dao.service_sms_sender_dao import dao_get_service_sms_senders_by_id
from app.enums import NotificationType, ServicePermissionType, TemplateType, KeyType
from app.enums import KeyType, NotificationType, ServicePermissionType, TemplateType
from app.models import ServicePermission
from app.notifications.process_notifications import create_content_for_notification
from app.serialised_models import SerialisedTemplate