mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-14 23:07:49 -04:00
notify-api-412 use black to enforce python style standards
This commit is contained in:
@@ -5,26 +5,28 @@ AWS_CLIENT_CONFIG = Config(
|
||||
# endpoints. See https://aws.amazon.com/compliance/fips/ for more
|
||||
# information.
|
||||
s3={
|
||||
'addressing_style': 'virtual',
|
||||
"addressing_style": "virtual",
|
||||
},
|
||||
use_fips_endpoint=True
|
||||
use_fips_endpoint=True,
|
||||
)
|
||||
STATISTICS_REQUESTED = 'requested'
|
||||
STATISTICS_DELIVERED = 'delivered'
|
||||
STATISTICS_FAILURE = 'failure'
|
||||
STATISTICS_REQUESTED = "requested"
|
||||
STATISTICS_DELIVERED = "delivered"
|
||||
STATISTICS_FAILURE = "failure"
|
||||
|
||||
|
||||
class ClientException(Exception):
|
||||
'''
|
||||
"""
|
||||
Base Exceptions for sending notifications that fail
|
||||
'''
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class Client(object):
|
||||
'''
|
||||
"""
|
||||
Base client for sending notifications.
|
||||
'''
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
@@ -46,10 +48,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 ['email', 'sms'] # nosec B101
|
||||
assert notification_type in ["email", "sms"] # nosec B101
|
||||
|
||||
if notification_type == 'email':
|
||||
if notification_type == "email":
|
||||
return self.get_email_client(name)
|
||||
|
||||
if notification_type == 'sms':
|
||||
if notification_type == "sms":
|
||||
return self.get_sms_client(name)
|
||||
|
||||
Reference in New Issue
Block a user