Put a cap on our cyclomatic complexity

flake8 has support for cyclomatic complexity (Mccabe) currently our
worst offender has a complexity of 15 (25 is considered very bad). So
set our max-complexity to 16 so we at least don't make things any worse.

https://github.com/flintwork/mccabe

Change-Id: Ied156f42aaee351f0023ea7dc38bb307ccdbf098
This commit is contained in:
Flavio Percoco 2014-10-17 15:55:10 +02:00
parent 6cdaa0a949
commit f8dd975b96

View File

@ -57,6 +57,9 @@ commands = python setup.py build_sphinx
[flake8]
exclude = .venv*,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*.egg,.update-venv
# NOTE(flaper87): Our currently max-complexity is 15. Not sure what the ideal complexity
# for Zaqar should be but lets keep it to the minimum possible.
max-complexity = 16
[hacking]
import_exceptions = zaqar.openstack.common.gettextutils._,zaqar.i18n._