Merge pull request #813 from alphagov/pep8-rename

Use pycodestyle instead of PEP8
This commit is contained in:
Chris Hill-Scott
2017-02-02 16:02:02 +00:00
committed by GitHub
5 changed files with 7 additions and 5 deletions

View File

@@ -96,7 +96,7 @@ Then simply run
make test
```
That will run pep8 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 pycodestyle 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

@@ -153,6 +153,7 @@ class Service(db.Model, Versioned):
default=BRANDING_GOVUK
)
MOBILE_TYPE = 'mobile'
EMAIL_TYPE = 'email'
@@ -340,6 +341,7 @@ class TemplateHistory(db.Model):
nullable=False,
default=NORMAL)
MMG_PROVIDER = "mmg"
FIRETEXT_PROVIDER = "firetext"
SES_PROVIDER = 'ses'

View File

@@ -1,5 +1,5 @@
-r requirements.txt
pep8==1.7.0
pycodestyle==2.3.1
pytest==3.0.1
pytest-mock==1.2
pytest-cov==2.3.1

View File

@@ -27,7 +27,7 @@ function display_result {
if [[ -z "$VIRTUAL_ENV" ]] && [[ -d venv ]]; then
source ./venv/bin/activate
fi
pep8 .
pycodestyle .
display_result $? 1 "Code style check"
py.test --cov=app --cov-report=term-missing tests/ --junitxml=test_results.xml

View File

@@ -1,4 +1,4 @@
[pep8]
[pycodestyle]
max-line-length = 120
ignore = E402
ignore = E402, E722
exclude = ./migrations,./venv,./venv3,./build,./cache