From e4ba4297e151ee857a5495c9404b1ef440ff91e0 Mon Sep 17 00:00:00 2001 From: Son NK Date: Thu, 12 Dec 2019 21:11:10 +0100 Subject: [PATCH] reformat using black --- app/api/views/new_custom_alias.py | 7 ++++++- app/dashboard/views/custom_domain.py | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/api/views/new_custom_alias.py b/app/api/views/new_custom_alias.py index 8b30a0e9..3c242812 100644 --- a/app/api/views/new_custom_alias.py +++ b/app/api/views/new_custom_alias.py @@ -28,7 +28,12 @@ def new_custom_alias(): user = g.user if not user.can_create_new_custom_alias(): LOG.d("user %s cannot create custom alias", user) - return jsonify(error="You have created 3 custom aliases, please upgrade to create more"), 400 + return ( + jsonify( + error="You have created 3 custom aliases, please upgrade to create more" + ), + 400, + ) user_custom_domains = [cd.domain for cd in user.verified_custom_domains()] hostname = request.args.get("hostname") diff --git a/app/dashboard/views/custom_domain.py b/app/dashboard/views/custom_domain.py index aacc00e7..b7a77e6e 100644 --- a/app/dashboard/views/custom_domain.py +++ b/app/dashboard/views/custom_domain.py @@ -79,7 +79,10 @@ def custom_domain(): for email_server in EMAIL_SERVERS: email_server = email_server[:-1] # remove the trailing . if email_server not in spf_domains: - flash(f"{email_server} is not included in your SPF record.", "warning") + flash( + f"{email_server} is not included in your SPF record.", + "warning", + ) mx_domains = get_mx_domains(custom_domain.domain) if mx_domains != EMAIL_SERVERS: