Use --max-complexity flake8 rule
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magnum |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This feature is quite useful to detect over-complex code. According to McCabe, anything that goes beyond 10 is too complex. See https:/
Currently the max complexity in the magnum code base is 13:
Setting the max complexity to 14 allows us to not produce anything more complex. We can work on reducing our complex functions and reducing this number to 10.
Changed in magnum: | |
milestone: | none → mitaka-1 |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/224184 /git.openstack. org/cgit/ openstack/ magnum/ commit/ ?id=d907843ae43 a267f4980c0e5b7 2b305f9d18dcc5
Committed: https:/
Submitter: Jenkins
Branch: master
commit d907843ae43a267 f4980c0e5b72b30 5f9d18dcc5
Author: Tom Cammann <email address hidden>
Date: Wed Sep 16 17:21:44 2015 +0100
Use --max-complexity flake8 rule
This feature is quite useful to detect over-complex code. According to /en.wikipedia. org/wiki/ Cyclomatic_ complexity.
McCabe, anything that goes beyond 10 is too complex. See
https:/
Currently the max complexity is 13:
Setting the max complexity to 14 allows us to not produce anything more
complex. We can work on reducing our complex functions and reducing this
number to 10.
Change-Id: Iaf9c87ecb4873e 646d952fd892aaf eb7c91fb5e5
Closes-Bug: #1498872