Angus Salkeld d78711e82f Put a cap on our cyclomatic complexity
flake8 has support for cyclomatic complexity (Mccabe) currently our
worst offender has a complexity of 18 (25 is considered very bad). So
set our max-complexity to 20 so we keep our complexity in a great shape.

https://github.com/flintwork/mccabe

Change-Id: I682f3c192e46bd50236b10a337f0b129c4b02eb8
2014-10-17 14:33:46 +10:00

40 lines
915 B
INI

[tox]
envlist = py26,py27,pypy,pep8
minversion = 1.6
skipsdist = True
[testenv]
# Set PYTHONHASHSEED to 0 so that randomisation is disabled and
# urlutils.urlencode() has predictable results.
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
commands=
python setup.py build_sphinx
[tox:jenkins]
downloadcache = ~/cache/pip
[flake8]
show-source = True
# H302: Do not import objects, only modules
ignore = H302
builtins = _
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build
max-complexity=20