enthought / enthought/distarray
McCabe Complexity
- Lingua principale
- Python
- Stelle
- 5
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
[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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Esegui `flake8 --max-complexity=10 --select=C distarray` dalla radice del repository e ispeziona `distarray/local/localarray.py:1601` e `distarray/plotting/plotting.py:68`. Escludi `distarray/externals/six.py`; il lavoro è completato quando le due funzioni del progetto non superano più la soglia di complessità scelta e l'output del checker è stato verificato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- tooling
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100