Enforce order and style of imports

Done using isort[1], with the following command:
```
isort -rc ./app ./tests
```

Adds linting to the `run_tests.sh` script to stop badly-sorted imports
getting re-introduced.

Chosen style is ‘Vertical Hanging Indent’ with trailing commas, because
I think it gives the cleanest diffs, eg:
```
from third_party import (
    lib1,
    lib2,
    lib3,
    lib4,
)
```

1. https://pypi.python.org/pypi/isort
This commit is contained in:
Chris Hill-Scott
2018-02-20 11:22:17 +00:00
parent 0217a6a962
commit f3a0c505bd
102 changed files with 622 additions and 647 deletions

View File

@@ -4,19 +4,22 @@ from flask_login import login_required
from app import email_branding_client
from app.main import main
from app.main.forms import (
ServiceCreateEmailBranding,
ServiceSelectEmailBranding,
ServiceUpdateEmailBranding,
ServiceCreateEmailBranding
)
from app.utils import user_has_permissions, get_cdn_domain
from app.main.s3_client import (
TEMP_TAG,
upload_logo,
delete_temp_file,
delete_temp_files_created_by,
persist_logo
persist_logo,
upload_logo,
)
from app.main.views.service_settings import get_branding_as_value_and_label, get_branding_as_dict
from app.main.views.service_settings import (
get_branding_as_dict,
get_branding_as_value_and_label,
)
from app.utils import get_cdn_domain, user_has_permissions
@main.route("/email-branding", methods=['GET', 'POST'])