mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
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:
@@ -1,24 +1,17 @@
|
||||
import json
|
||||
from functools import partial
|
||||
import copy
|
||||
from unittest.mock import call, ANY
|
||||
import json
|
||||
from datetime import datetime
|
||||
from functools import partial
|
||||
from unittest.mock import ANY, call
|
||||
|
||||
from flask import url_for
|
||||
import pytest
|
||||
from bs4 import BeautifulSoup
|
||||
from flask import url_for
|
||||
from freezegun import freeze_time
|
||||
from datetime import datetime
|
||||
|
||||
from app.main.views.dashboard import (
|
||||
get_dashboard_totals,
|
||||
format_monthly_stats_to_list,
|
||||
get_free_paid_breakdown_for_billable_units,
|
||||
aggregate_status_types,
|
||||
format_template_stats_to_list,
|
||||
get_tuples_of_financial_years
|
||||
from tests import (
|
||||
validate_route_permission,
|
||||
validate_route_permission_with_client,
|
||||
)
|
||||
|
||||
from tests import validate_route_permission, validate_route_permission_with_client
|
||||
from tests.conftest import (
|
||||
SERVICE_ONE_ID,
|
||||
mock_get_inbound_sms_summary,
|
||||
@@ -26,6 +19,15 @@ from tests.conftest import (
|
||||
normalize_spaces,
|
||||
)
|
||||
|
||||
from app.main.views.dashboard import (
|
||||
aggregate_status_types,
|
||||
format_monthly_stats_to_list,
|
||||
format_template_stats_to_list,
|
||||
get_dashboard_totals,
|
||||
get_free_paid_breakdown_for_billable_units,
|
||||
get_tuples_of_financial_years,
|
||||
)
|
||||
|
||||
stub_template_stats = [
|
||||
{
|
||||
'template_type': 'sms',
|
||||
|
||||
Reference in New Issue
Block a user