mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Run isort
This commit is contained in:
@@ -1,49 +1,50 @@
|
|||||||
|
import itertools
|
||||||
import os
|
import os
|
||||||
import urllib
|
import urllib
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
|
from functools import partial
|
||||||
from time import monotonic
|
from time import monotonic
|
||||||
|
|
||||||
import itertools
|
|
||||||
import ago
|
import ago
|
||||||
from itsdangerous import BadSignature
|
|
||||||
from flask import (
|
from flask import (
|
||||||
session,
|
|
||||||
render_template,
|
|
||||||
make_response,
|
|
||||||
current_app,
|
current_app,
|
||||||
request,
|
flash,
|
||||||
g,
|
g,
|
||||||
|
make_response,
|
||||||
|
render_template,
|
||||||
|
request,
|
||||||
|
session,
|
||||||
url_for,
|
url_for,
|
||||||
flash
|
|
||||||
)
|
)
|
||||||
from flask._compat import string_types
|
from flask._compat import string_types
|
||||||
from flask.globals import _lookup_req_object, _request_ctx_stack
|
from flask.globals import _lookup_req_object, _request_ctx_stack
|
||||||
from flask_login import LoginManager, current_user
|
from flask_login import LoginManager, current_user
|
||||||
from flask_wtf import CSRFProtect
|
from flask_wtf import CSRFProtect
|
||||||
from flask_wtf.csrf import CSRFError
|
from flask_wtf.csrf import CSRFError
|
||||||
from functools import partial
|
from itsdangerous import BadSignature
|
||||||
|
|
||||||
from notifications_python_client.errors import HTTPError
|
from notifications_python_client.errors import HTTPError
|
||||||
from notifications_utils import logging, request_helper, formatters
|
from notifications_utils import formatters, logging, request_helper
|
||||||
|
from notifications_utils.formatters import formatted_list
|
||||||
from notifications_utils.recipients import (
|
from notifications_utils.recipients import (
|
||||||
validate_phone_number,
|
|
||||||
InvalidPhoneError,
|
InvalidPhoneError,
|
||||||
format_phone_number_human_readable,
|
format_phone_number_human_readable,
|
||||||
|
validate_phone_number,
|
||||||
)
|
)
|
||||||
from notifications_utils.formatters import formatted_list
|
|
||||||
from notifications_utils.sanitise_text import SanitiseASCII
|
from notifications_utils.sanitise_text import SanitiseASCII
|
||||||
from notifications_utils.timezones import utc_string_to_aware_gmt_datetime
|
from notifications_utils.timezones import utc_string_to_aware_gmt_datetime
|
||||||
from werkzeug.exceptions import abort, HTTPException as WerkzeugHTTPException
|
from werkzeug.exceptions import HTTPException as WerkzeugHTTPException
|
||||||
|
from werkzeug.exceptions import abort
|
||||||
from werkzeug.local import LocalProxy
|
from werkzeug.local import LocalProxy
|
||||||
|
|
||||||
from app import proxy_fix
|
from app import proxy_fix
|
||||||
from app.config import configs
|
|
||||||
from app.asset_fingerprinter import asset_fingerprinter
|
from app.asset_fingerprinter import asset_fingerprinter
|
||||||
|
from app.commands import setup_commands
|
||||||
|
from app.config import configs
|
||||||
from app.extensions import (
|
from app.extensions import (
|
||||||
antivirus_client,
|
antivirus_client,
|
||||||
|
redis_client,
|
||||||
statsd_client,
|
statsd_client,
|
||||||
zendesk_client,
|
zendesk_client,
|
||||||
redis_client,
|
|
||||||
)
|
)
|
||||||
from app.models.service import Service
|
from app.models.service import Service
|
||||||
from app.models.user import AnonymousUser
|
from app.models.user import AnonymousUser
|
||||||
@@ -51,29 +52,34 @@ from app.navigation import (
|
|||||||
CaseworkNavigation,
|
CaseworkNavigation,
|
||||||
HeaderNavigation,
|
HeaderNavigation,
|
||||||
MainNavigation,
|
MainNavigation,
|
||||||
OrgNavigation
|
OrgNavigation,
|
||||||
)
|
)
|
||||||
from app.notify_client.service_api_client import service_api_client
|
|
||||||
from app.notify_client.api_key_api_client import api_key_api_client
|
from app.notify_client.api_key_api_client import api_key_api_client
|
||||||
from app.notify_client.invite_api_client import invite_api_client
|
|
||||||
from app.notify_client.job_api_client import job_api_client
|
|
||||||
from app.notify_client.notification_api_client import notification_api_client
|
|
||||||
from app.notify_client.status_api_client import status_api_client
|
|
||||||
from app.notify_client.template_statistics_api_client import template_statistics_client
|
|
||||||
from app.notify_client.user_api_client import user_api_client
|
|
||||||
from app.notify_client.events_api_client import events_api_client
|
|
||||||
from app.notify_client.provider_client import provider_client
|
|
||||||
from app.notify_client.email_branding_client import email_branding_client
|
|
||||||
from app.notify_client.letter_branding_client import letter_branding_client
|
|
||||||
from app.notify_client.organisations_api_client import organisations_client
|
|
||||||
from app.notify_client.org_invite_api_client import org_invite_api_client
|
|
||||||
from app.notify_client.letter_jobs_client import letter_jobs_client
|
|
||||||
from app.notify_client.inbound_number_client import inbound_number_client
|
|
||||||
from app.notify_client.billing_api_client import billing_api_client
|
from app.notify_client.billing_api_client import billing_api_client
|
||||||
from app.notify_client.complaint_api_client import complaint_api_client
|
from app.notify_client.complaint_api_client import complaint_api_client
|
||||||
from app.notify_client.platform_stats_api_client import platform_stats_api_client
|
from app.notify_client.email_branding_client import email_branding_client
|
||||||
from app.notify_client.template_folder_api_client import template_folder_api_client
|
from app.notify_client.events_api_client import events_api_client
|
||||||
from app.commands import setup_commands
|
from app.notify_client.inbound_number_client import inbound_number_client
|
||||||
|
from app.notify_client.invite_api_client import invite_api_client
|
||||||
|
from app.notify_client.job_api_client import job_api_client
|
||||||
|
from app.notify_client.letter_branding_client import letter_branding_client
|
||||||
|
from app.notify_client.letter_jobs_client import letter_jobs_client
|
||||||
|
from app.notify_client.notification_api_client import notification_api_client
|
||||||
|
from app.notify_client.org_invite_api_client import org_invite_api_client
|
||||||
|
from app.notify_client.organisations_api_client import organisations_client
|
||||||
|
from app.notify_client.platform_stats_api_client import (
|
||||||
|
platform_stats_api_client,
|
||||||
|
)
|
||||||
|
from app.notify_client.provider_client import provider_client
|
||||||
|
from app.notify_client.service_api_client import service_api_client
|
||||||
|
from app.notify_client.status_api_client import status_api_client
|
||||||
|
from app.notify_client.template_folder_api_client import (
|
||||||
|
template_folder_api_client,
|
||||||
|
)
|
||||||
|
from app.notify_client.template_statistics_api_client import (
|
||||||
|
template_statistics_client,
|
||||||
|
)
|
||||||
|
from app.notify_client.user_api_client import user_api_client
|
||||||
from app.utils import get_logo_cdn_domain, id_safe
|
from app.utils import get_logo_cdn_domain, id_safe
|
||||||
|
|
||||||
login_manager = LoginManager()
|
login_manager = LoginManager()
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
main = Blueprint('main', __name__) # noqa
|
|
||||||
|
|
||||||
from app.main.views import ( # noqa
|
from app.main.views import ( # noqa
|
||||||
|
add_service,
|
||||||
|
agreement,
|
||||||
|
api_keys,
|
||||||
|
choose_account,
|
||||||
|
code_not_received,
|
||||||
|
conversation,
|
||||||
|
dashboard,
|
||||||
|
email_branding,
|
||||||
|
feedback,
|
||||||
|
find_users,
|
||||||
|
forgot_password,
|
||||||
|
inbound_number,
|
||||||
index,
|
index,
|
||||||
|
invites,
|
||||||
|
jobs,
|
||||||
|
letter_branding,
|
||||||
|
manage_users,
|
||||||
|
new_password,
|
||||||
|
notifications,
|
||||||
|
organisations,
|
||||||
|
platform_admin,
|
||||||
|
providers,
|
||||||
|
register,
|
||||||
|
send,
|
||||||
|
service_settings,
|
||||||
sign_in,
|
sign_in,
|
||||||
sign_out,
|
sign_out,
|
||||||
register,
|
|
||||||
two_factor,
|
|
||||||
verify,
|
|
||||||
send,
|
|
||||||
add_service,
|
|
||||||
code_not_received,
|
|
||||||
jobs,
|
|
||||||
dashboard,
|
|
||||||
templates,
|
|
||||||
service_settings,
|
|
||||||
forgot_password,
|
|
||||||
new_password,
|
|
||||||
styleguide,
|
styleguide,
|
||||||
|
templates,
|
||||||
|
two_factor,
|
||||||
user_profile,
|
user_profile,
|
||||||
choose_account,
|
verify,
|
||||||
api_keys,
|
|
||||||
manage_users,
|
|
||||||
invites,
|
|
||||||
feedback,
|
|
||||||
providers,
|
|
||||||
find_users,
|
|
||||||
platform_admin,
|
|
||||||
email_branding,
|
|
||||||
letter_branding,
|
|
||||||
conversation,
|
|
||||||
organisations,
|
|
||||||
notifications,
|
|
||||||
inbound_number,
|
|
||||||
agreement,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
main = Blueprint('main', __name__) # noqa
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
from flask import abort, has_request_context, request
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
from flask import has_request_context, request, abort
|
|
||||||
from notifications_python_client.base import BaseAPIClient
|
|
||||||
from notifications_python_client import __version__
|
from notifications_python_client import __version__
|
||||||
|
from notifications_python_client.base import BaseAPIClient
|
||||||
|
|
||||||
|
|
||||||
def _attach_current_user(data):
|
def _attach_current_user(data):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
status = Blueprint('status', __name__)
|
|
||||||
|
|
||||||
from app.status.views import healthcheck # noqa
|
from app.status.views import healthcheck # noqa
|
||||||
|
|
||||||
|
status = Blueprint('status', __name__)
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
from unittest.mock import patch
|
|
||||||
import pytest
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
from flask.testing import FlaskClient
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
import pytest
|
||||||
from flask import url_for
|
from flask import url_for
|
||||||
|
from flask.testing import FlaskClient
|
||||||
from flask_login import login_user
|
from flask_login import login_user
|
||||||
|
|
||||||
from app.models.user import InvitedOrgUser
|
from app.models.user import InvitedOrgUser
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user