Merge pull request #155 from dod-ccpo/linting
Lint entire `atst` module
This commit is contained in:
commit
e7511f504c
@ -1,7 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
from wtforms.fields.html5 import EmailField
|
from wtforms.fields.html5 import EmailField
|
||||||
from wtforms.fields import StringField, SelectField
|
from wtforms.fields import StringField, SelectField
|
||||||
from wtforms.form import Form
|
|
||||||
from wtforms.validators import Required, Email
|
from wtforms.validators import Required, Email
|
||||||
|
|
||||||
from atst.domain.exceptions import NotFoundError
|
from atst.domain.exceptions import NotFoundError
|
||||||
@ -41,7 +40,7 @@ def suggest_pe_id(pe_id):
|
|||||||
|
|
||||||
def validate_pe_id(field, existing_request):
|
def validate_pe_id(field, existing_request):
|
||||||
try:
|
try:
|
||||||
pe_number = PENumbers.get(field.data)
|
PENumbers.get(field.data)
|
||||||
except NotFoundError:
|
except NotFoundError:
|
||||||
suggestion = suggest_pe_id(field.data)
|
suggestion = suggest_pe_id(field.data)
|
||||||
error_str = (
|
error_str = (
|
||||||
|
@ -2,7 +2,7 @@ from wtforms.fields import StringField
|
|||||||
from wtforms.fields.html5 import EmailField
|
from wtforms.fields.html5 import EmailField
|
||||||
from wtforms.validators import Required, Email, Length
|
from wtforms.validators import Required, Email, Length
|
||||||
from .forms import ValidatedForm
|
from .forms import ValidatedForm
|
||||||
from .validators import IsNumber, Alphabet
|
from .validators import IsNumber
|
||||||
|
|
||||||
|
|
||||||
class POCForm(ValidatedForm):
|
class POCForm(ValidatedForm):
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
from wtforms.fields.html5 import IntegerField
|
from wtforms.fields.html5 import IntegerField
|
||||||
from wtforms.fields import RadioField, StringField, TextAreaField, SelectField
|
from wtforms.fields import RadioField, TextAreaField, SelectField
|
||||||
from wtforms.validators import NumberRange, InputRequired
|
|
||||||
from .fields import DateField
|
from .fields import DateField
|
||||||
from .forms import ValidatedForm
|
from .forms import ValidatedForm
|
||||||
from .validators import DateRange
|
|
||||||
import pendulum
|
|
||||||
|
|
||||||
|
|
||||||
class RequestForm(ValidatedForm):
|
class RequestForm(ValidatedForm):
|
||||||
|
@ -10,7 +10,7 @@ export FLASK_ENV=test
|
|||||||
RESET_DB="true"
|
RESET_DB="true"
|
||||||
|
|
||||||
# Define all relevant python files and directories for this app
|
# Define all relevant python files and directories for this app
|
||||||
PYTHON_FILES="./app.py ./atst ./config"
|
PYTHON_FILES="./app.py ./atst/** ./config"
|
||||||
|
|
||||||
# Enable Python testing
|
# Enable Python testing
|
||||||
RUN_PYTHON_TESTS="true"
|
RUN_PYTHON_TESTS="true"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user