use flake8 instead of pycodestyle

since there are thousands and thousands of errors in the tests files
at the moment, i propose fixing those errors in separate PR for now.
This commit is contained in:
Leo Hemsted
2017-11-28 13:51:47 +00:00
parent 28088428f1
commit 90e9a2f1b3
5 changed files with 6 additions and 9 deletions

View File

@@ -100,7 +100,7 @@ Then simply run
make test
```
That will run pycodestyle for code analysis and our unit test suite. If you wish to run our functional tests, instructions can be found in the
That will run flake8 for code analysis and our unit test suite. If you wish to run our functional tests, instructions can be found in the
[notifications-functional-tests](https://github.com/alphagov/notifications-functional-tests) repository.

View File

@@ -1,5 +1,5 @@
-r requirements.txt
pycodestyle==2.3.1
flake8==3.5.0
pytest==3.2.5
pytest-mock==1.6.3
pytest-cov==2.5.1
@@ -9,4 +9,4 @@ freezegun==0.3.9
requests-mock==1.3.0
# optional requirements for jsonschema
strict-rfc3339==0.7
rfc3987==1.3.7
rfc3987==1.3.7

View File

@@ -64,6 +64,7 @@ def delete_queue(queue_url):
print('Deleted queue successfully {}'.format(response['ResponseMetadata']))
else:
print('Error occured when attempting to delete queue')
from pprint import pprint
pprint(response)
return response

View File

@@ -27,7 +27,8 @@ function display_result {
if [[ -z "$VIRTUAL_ENV" ]] && [[ -d venv ]]; then
source ./venv/bin/activate
fi
pycodestyle .
echo -e "\033[31mWARNING. NOT RUNNING flake8 AGAINST TEST DIRECTORY DUE TO LARGE AMOUNT OF EXISTING ISSUES.\033[0m"
flake8 app/
display_result $? 1 "Code style check"
# run with four concurrent threads

View File

@@ -1,7 +1,2 @@
[pycodestyle]
max-line-length = 120
ignore = E402, E722
exclude = ./migrations,./venv,./venv3,./build,./cache
[tool:pytest]
xfail_strict=true