mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 10:12:32 -05:00
Enforce consistency in imports as part of build
This copies the config we use in the admin app, with a few changes as discussed in the PR [1]. We'll apply these to our other apps. [1]: https://github.com/alphagov/notifications-api/pull/3175#issuecomment-795530323
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
-r requirements.txt
|
||||
flake8==3.8.4
|
||||
flake8-bugbear==20.11.1
|
||||
isort==5.7.0
|
||||
moto==1.3.16
|
||||
pytest==6.1.2
|
||||
pytest-env==0.6.2
|
||||
|
||||
@@ -30,6 +30,9 @@ display_result $? 1 "Requirements check"
|
||||
flake8 .
|
||||
display_result $? 1 "Code style check"
|
||||
|
||||
isort --check-only ./app ./tests
|
||||
display_result $? 2 "Import order check"
|
||||
|
||||
# run with four concurrent threads
|
||||
py.test -n4 -v --maxfail=10
|
||||
display_result $? 2 "Unit tests"
|
||||
|
||||
10
setup.cfg
10
setup.cfg
@@ -7,3 +7,13 @@ exclude = venv*,__pycache__,node_modules,cache,migrations,build,sample_cap_xml_d
|
||||
max-line-length = 120
|
||||
# W504 line break after binary operator
|
||||
extend_ignore=B306, W504
|
||||
|
||||
|
||||
[isort]
|
||||
line_length=80
|
||||
indent=' '
|
||||
multi_line_output=3
|
||||
known_third_party=notifications_utils,notifications_python_client
|
||||
known_first_party=app,tests
|
||||
include_trailing_comma=True
|
||||
use_parentheses=True
|
||||
|
||||
Reference in New Issue
Block a user