Add max-complexity to pep8 for Horizon
Picked this up from Keystone. It sounds like a good defense to have from further making our code more complex. The current highest complexity is 32, set the maximum complexity for flake8 to 33. 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. openstack_dashboard.dashboards.identity.projects.workflows: 'UpdateProject.handle' is complexity of 32 openstack_dashboard.dashboards.project.access_and_security.security_groups.forms: 'AddRule.clean' is complexity of 20 openstack_dashboard.dashboards.project.instances.workflows.create_instance: 'SetInstanceDetailsAction.clean' is complexity of 26 horizon.exceptions: 'handle' is complexity of 24 Change-Id: I58cc20972aac221012f248e8135151b1243dae35
This commit is contained in:
parent
ac36e3f401
commit
5304e14559
1
tox.ini
1
tox.ini
@ -67,6 +67,7 @@ exclude = .venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,panel_
|
||||
# H803 git commit title should not end with period (disabled on purpose, see bug #1236621)
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = H307,H405,H803,H904
|
||||
max-complexity=33
|
||||
|
||||
[hacking]
|
||||
import_exceptions = collections.defaultdict,
|
||||
|
Loading…
Reference in New Issue
Block a user