Made enums.py for all the enums to avoid cyclic imports.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-10 12:32:25 -05:00
parent ac9591ec7c
commit 3982f061b6
31 changed files with 149 additions and 155 deletions

View File

@@ -1,9 +1,10 @@
from abc import abstractmethod
from typing import Protocol
from app.models import NotificationType
from botocore.config import Config
from app.enums import NotificationType
AWS_CLIENT_CONFIG = Config(
# This config is required to enable S3 to connect to FIPS-enabled
# endpoints. See https://aws.amazon.com/compliance/fips/ for more
@@ -54,7 +55,10 @@ class NotificationProviderClients(object):
return self.email_clients.get(name)
def get_client_by_name_and_type(self, name, notification_type):
assert notification_type in {NotificationType.EMAIL, NotificationType.SMS} # nosec B101
assert notification_type in {
NotificationType.EMAIL,
NotificationType.SMS,
} # nosec B101
if notification_type == NotificationType.EMAIL:
return self.get_email_client(name)