
Fixes some new PEP8 errors that appear with jobs running on new ubuntu version, and temporarily filters out the larger I202 error ("Additional newline in a group of imports"). This patch updates the hacking and flake8-import-order versions. Copied from: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/936855 Change-Id: Ice4513eedc4fd6f054c19d1854eff00aeb5c35a1
42 lines
1.2 KiB
INI
42 lines
1.2 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = pep8
|
|
skipsdist = True
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = {env:TOX_PYTHON:python3}
|
|
usedevelop = True
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = stestr run --slowest {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# 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
|
|
# H405: multi line docstring summary not separated with an empty line
|
|
# W504: line break after binary operator
|
|
# I202 Additional newline in a group of imports
|
|
ignore = H405,W504,I202
|
|
show-source = true
|
|
exclude = ./.*,build,dist,doc,*egg*,releasenotes
|
|
import-order-style = pep8
|