[tox] envlist = py39,py27,pep8 minversion = 2.3 skipsdist = True toxworkdir = /tmp/{env:USER}_utilities_pci_irq_affinity_agent_tox [testenv] sitepackages = False basepython = python2.7 install_command = pip install -vvv -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_DEBUG=1 OS_LOG_CAPTURE=1 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt allowlist_externals = bash commands = pytest pci_irq_affinity/tests/ [testenv:py36] basepython = python3.6 [testenv:py39] basepython = python3.9 [flake8] # Note: hacking pulls in flake8 2.5.5 which can not parse an ignore list spanning multiple lines # F errors are high priority to fix. W are warnings. E series are pep8, H series are hacking # F401 'FOO' imported but unused # F841 local variable 'FOO' is assigned to but never used # W291 trailing whitespace # W391 blank line at end of file # W503 line break before binary operator # W504 line break after binary operator # W605 invalid escape sequence '\s' # E128 continuation line under-indented for visual indent # E221 multiple spaces before operator # E226 missing whitespace around arithmetic operator # E227 missing whitespace around bitwise or shift operator # E241 multiple spaces after ',' # E265 block comment should start with '# ' # E302 expected 2 blank lines, found 1 # E305 expected 2 blank lines after class or function definition, found 1 # E501 line too long # E502 the backslash is redundant between brackets # E702 multiple statements on one line (semicolon) # E722 do not use bare 'except' # H101 is TODO # H104 File contains nothing but comments # H201 no 'except:' at least use 'except Exception:' # H238 old style class declaration, use new style (inherit from `object`) # H306 imports not in alphabetical order (sys, re) # H401 docstring should not start with a space # H405 multi line docstring summary not separated with an empty line ignore = F401,F841,W291,W391,W503,W504,W605,E128,E221,E226,E227,E241,E265,E302,E305,E501,E502,E702,E722,H101,H104,H201,H238,H306,H401,H405 # max-line-length is not referenced if E501 is suppressed max-line-length=80 import-order-style = google application-import-names = pci_irq_affinity [testenv:pep8] commands = flake8 [testenv:pylint] commands = pylint {posargs} pci_irq_affinity --rcfile=../../../pylint.rc [testenv:bandit] description = Dummy environment to allow bandit to be run in subdir tox [testenv:bindep] # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed # separately, outside of the requirements files, and develop mode disabled # explicitly to avoid unnecessarily installing the checked-out repo too (this # further relies on "tox.skipsdist = True" above). deps = bindep commands = bindep test usedevelop = False