Put a cap on our cyclomatic complexity

Flake8 has support for McCabe cyclomatic complexity.  Ironic's
most complex code is at 16 right now, so cap this at 17 to make
sure we don't start writing more complex code than what we already
have today.

Nova is doing similar: https://review.openstack.org/#/c/129125

Change-Id: I99fa26f763ab456d3428951d6a729098a73cf9ef
This commit is contained in:
Michael Davies 2014-10-16 22:27:32 -07:00
parent 3f1f4f3973
commit 596972b86c

View File

@ -49,6 +49,7 @@ commands = {posargs}
# TODO(yuriyz): Analyze or fix the warnings blacklisted below
ignore = E12,E265,E711
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,*ironic/nova*
max-complexity=17
[hacking]
import_exceptions = testtools.matchers, ironic.common.i18n