mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-13 09:50:08 -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,42 +1,42 @@
|
||||
import pytz
|
||||
import weakref
|
||||
|
||||
from flask_wtf import FlaskForm as Form
|
||||
from datetime import datetime, timedelta
|
||||
from itertools import chain
|
||||
|
||||
from notifications_utils.recipients import (
|
||||
validate_phone_number,
|
||||
InvalidPhoneError
|
||||
)
|
||||
import pytz
|
||||
from flask_wtf import FlaskForm as Form
|
||||
from flask_wtf.file import FileAllowed
|
||||
from flask_wtf.file import FileField as FileField_wtf
|
||||
from notifications_utils.columns import Columns
|
||||
from notifications_utils.recipients import (
|
||||
InvalidPhoneError,
|
||||
validate_phone_number,
|
||||
)
|
||||
from wtforms import (
|
||||
widgets,
|
||||
validators,
|
||||
StringField,
|
||||
PasswordField,
|
||||
ValidationError,
|
||||
TextAreaField,
|
||||
FileField,
|
||||
BooleanField,
|
||||
DateField,
|
||||
FieldList,
|
||||
FileField,
|
||||
HiddenField,
|
||||
IntegerField,
|
||||
PasswordField,
|
||||
RadioField,
|
||||
FieldList,
|
||||
DateField,
|
||||
StringField,
|
||||
TextAreaField,
|
||||
ValidationError,
|
||||
validators,
|
||||
widgets,
|
||||
)
|
||||
from wtforms.fields.html5 import EmailField, TelField, SearchField
|
||||
from wtforms.validators import (DataRequired, Length, Regexp, Optional)
|
||||
from flask_wtf.file import FileField as FileField_wtf, FileAllowed
|
||||
from wtforms.fields.html5 import EmailField, SearchField, TelField
|
||||
from wtforms.validators import DataRequired, Length, Optional, Regexp
|
||||
|
||||
from app.main.validators import (
|
||||
Blacklist,
|
||||
CsvFileValidator,
|
||||
ValidGovEmail,
|
||||
LettersNumbersAndFullStopsOnly,
|
||||
NoCommasInPlaceHolders,
|
||||
OnlyGSMCharacters,
|
||||
LettersNumbersAndFullStopsOnly,
|
||||
ValidEmail
|
||||
ValidEmail,
|
||||
ValidGovEmail,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user