You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should aim to reduce the cyclomatic complexity of some of our code to around 20 or below:
❯ 🅒 myenv jvavrek in becquerel on main flake8 . --max-complexity=20
./becquerel/core/calibration.py:180:1: C901 '_validate_expression' is too complex (21)
./becquerel/core/fitting.py:750:5: C901 'Fitter.fit' is too complex (25)
./becquerel/parsers/cnf.py:78:1: C901 'read' is too complex (54)
./becquerel/parsers/iec1455.py:32:1: C901 'read' is too complex (37)
./becquerel/parsers/spc.py:182:1: C901 'read' is too complex (40)
./becquerel/parsers/spe.py:11:1: C901 'read' is too complex (27)
./becquerel/tools/nndc.py:205:1: C901 '_parse_float_uncertainty' is too complex (23)
It's mostly the read methods with high complexity scores, which is probably fine, since there are a lot of branches necessary to read different fields. But we could potentially extract out some methods to knock those scores down. And we could probably improve Fitter.fit and the other non-read methods.
The text was updated successfully, but these errors were encountered:
We should aim to reduce the cyclomatic complexity of some of our code to around 20 or below:
It's mostly the
read
methods with high complexity scores, which is probably fine, since there are a lot of branches necessary to read different fields. But we could potentially extract out some methods to knock those scores down. And we could probably improveFitter.fit
and the other non-read
methods.The text was updated successfully, but these errors were encountered: