09e68605ea
The new flake8 version 3.6.0 introduces new warnings that cause the check and gate jobs to fail. Locking down the flake8 version to avoid these surprises in the future. We can later increment the flake8 version and fix the new warnings in a controlled manner. Change-Id: Ia1eac379feb67b9d2efd5bb67611fd60c2bf83ef Partial-Bug: 1799721 Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
66 lines
1.9 KiB
INI
66 lines
1.9 KiB
INI
[tox]
|
||
envlist = pep8,pylint
|
||
minversion = 2.3
|
||
skipsdist = True
|
||
|
||
[testenv]
|
||
basepython = python3
|
||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
||
setenv = VIRTUAL_ENV={envdir}
|
||
OS_STDOUT_CAPTURE=1
|
||
OS_STDERR_CAPTURE=1
|
||
OS_TEST_TIMEOUT=60
|
||
PYTHONDONTWRITEBYTECODE=True
|
||
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
|
||
whitelist_externals = find
|
||
|
||
[testenv:venv]
|
||
commands = {posargs}
|
||
|
||
[flake8]
|
||
# Temporarily ignoring these warnings
|
||
# E123 closing bracket does not match indentation of opening bracket
|
||
# E127 continuation line over-indented for visual indent
|
||
# E129 visually indented line with same indent as next logical line
|
||
# - hacking codes -
|
||
# H104: File contains nothing but comments
|
||
# H301: one import per line
|
||
# H306: imports not in alphabetical order
|
||
# H404: multi line docstring should start without a leading new line
|
||
# H405: multi line docstring summary not separated with an empty line
|
||
# H501: Do not use self.__dict__ for string formatting
|
||
# - flake8 codes -
|
||
# F821 undefined name 'unicode' (python3 specific)
|
||
ignore=E123,E127,E129
|
||
H104,H301,H306,H404,H405,H501,
|
||
F821
|
||
# H106 Don’t put vim configuration in source files (off by default).
|
||
# H203 Use assertIs(Not)None to check for None (off by default).
|
||
# TODO: enable: H904 Delay string interpolations at logging calls (off by default).
|
||
enable-extensions = H106,H203
|
||
max-line-length=84
|
||
|
||
[testenv:pep8]
|
||
usedevelop = False
|
||
skip_install = True
|
||
deps =
|
||
hacking
|
||
flake8-bugbear
|
||
flake8<3.6.0
|
||
commands =
|
||
flake8
|
||
|
||
[testenv:pylint]
|
||
basepython = python2.7
|
||
deps =
|
||
eventlet
|
||
oslo.config
|
||
oslo.log
|
||
paste
|
||
PasteDeploy
|
||
routes
|
||
webob
|
||
pylint
|
||
commands = pylint nova-api-proxy/nova_api_proxy --rcfile=pylint.rc
|
||
|