enthought / enthought/distarray
McCabe Complexity
- Dominant language
- Python
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
[This issue](https://github.com/openspending/openspending/issues/692) on another project puts it better than I can:
> McCabe complexity is a number that represents the number of different way one can traverse through a method. It is recommended that this measure never exceeds 10. Running a complexity checker on openspending results in 10 methods with too high complexity (current version). These should all be fixed to keep the code clean and maintainable.
>
> To see the errors I would recommend installing flake8 (can run McCabe's complexity checker and more), navigating to the root of the repo and running:
```
flake8 --max-complexity=10 --select=C distarray
```
the output is:
```
distarray/externals/six.py:559:1: C901 'print_' is too complex (22)
distarray/local/localarray.py:1601:1: C901 'LocalArrayBinaryOperation.__call__' is too complex (10)
distarray/plotting/plotting.py:68:1: C901 'plot_array_distribution' is too complex (15)
```
The `six` stuff isn't our problem. But the other functions definitely _look_ too complex.
This is low priority but I thought it was interesting. This might be a good issue for someone to tackle if they want to become acquainted with the codebase.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.