Add max-complexity to pep8 for Keystone

The current highest complexity is 23, set the maximum complexity
for flake8 to 24. This should help to keep code simple and
maintainable. It should be possible to reduce the maximum
complexity to something closer to 20 with relatively small efforts.

keystone.common.sql.migrate_repo.versions.039_grant_to_assignment:
    'downgrade_assignment_table' is complexity of 21

keystone.token.controllers:
    'Auth._authenticate_token' is complexity of 23

Change-Id: I47cb13bac97e9144ef004977942b9eaa50a17b39
This commit is contained in:
Morgan Fainberg
2014-10-16 23:10:13 -07:00
parent fdbad9f530
commit 7662e0d799

View File

@@ -106,6 +106,7 @@ ignore = H104,H405,H803,H904
builtins = _
exclude=.venv,.git,.tox,build,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
max-complexity=24
[testenv:docs]
commands=