Use flake8 for testing
Start using flake8 for style guide enforcement. Change-Id: I9d7c89498c10e682acf0f75bad20dfd4bb6152b5
This commit is contained in:
parent
4f9103d5a7
commit
90d02c0a03
|
@ -9,3 +9,4 @@ stestr>=1.0.0 # Apache-2.0
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
testtools>=2.2.0
|
testtools>=2.2.0
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
|
flake8-import-order>=0.13 # LGPLv3
|
17
tox.ini
17
tox.ini
|
@ -22,6 +22,7 @@ sitepackages = True
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
|
commands = flake8
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
setenv =
|
setenv =
|
||||||
|
@ -40,11 +41,19 @@ commands = python setup.py build_sphinx
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude = .venv,.tox,dist,doc,*.egg,build
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
show-source = true
|
show-source = true
|
||||||
|
# E129 visually indented line with same indent as next logical line
|
||||||
[pep8]
|
# E731 do not assign a lambda expression, use a def
|
||||||
ignore = E731,E226,E123
|
# W504 line break after binary operator
|
||||||
|
ignore = E129,E731,W504
|
||||||
|
# H106: Don't put vim configuration in source files
|
||||||
|
# H203: Use assertIs(Not)None to check for None
|
||||||
|
# H204: Use assert(Not)Equal to check for equality
|
||||||
|
# H205: Use assert(Greater|Less)(Equal) for comparison
|
||||||
|
# H904: Delay string interpolations at logging calls
|
||||||
|
enable-extensions=H106,H203,H204,H205,H904
|
||||||
|
import-order-style = pep8
|
||||||
|
|
||||||
[testenv:lower-constraints]
|
[testenv:lower-constraints]
|
||||||
deps =
|
deps =
|
||||||
|
|
Loading…
Reference in New Issue