Remi-Gau / nilearn

Machine learning for NeuroImaging in Python
http://nilearn.github.io
Other
1 stars 1 forks source link

test flake8 in ci #14

Closed Remi-Gau closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 14.86 🙂 14.86 🙂 0.00
Method Length 157.83 😞 157.83 😞 0.00
Working memory 15.80 ⛔ 15.80 ⛔ 0.00
Quality 41.38% 😞 41.38% 😞 0.00%
Other metrics Before After Change
Lines 927 927 0
Changed files Quality Before Quality After Quality Change
nilearn/decoding/decoder.py 41.38% 😞 41.38% 😞 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
nilearn/decoding/decoder.py _BaseDecoder.fit 28 😞 595 ⛔ 16 ⛔ 18.07% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
nilearn/decoding/decoder.py _parallel_fit 28 😞 295 ⛔ 17 ⛔ 20.53% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
nilearn/decoding/decoder.py _BaseDecoder._fetch_parallel_fit_outputs 17 🙂 300 ⛔ 18 ⛔ 26.69% 😞 Try splitting into smaller methods. Extract out complex expressions
nilearn/decoding/decoder.py _BaseDecoder.__init__ 0 ⭐ 167 😞 30 ⛔ 45.69% 😞 Try splitting into smaller methods. Extract out complex expressions
nilearn/decoding/decoder.py FREMRegressor.__init__ 1 ⭐ 149 😞 30 ⛔ 46.50% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

github-actions[bot] commented 1 year ago

👋 @Remi-Gau Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

We will review it as quick as possible, feel free to ping us with questions if needed.