Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STY: Apply ruff/flake8-comprehensions rules (C4) #3680

Merged
merged 8 commits into from
Oct 6, 2024

Conversation

DimitriPapadopoulos
Copy link
Contributor

Summary

Apply flake8-comprehensions (C4) rules, except:

  • C408 (15011 errors!)

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

Attention: Patch coverage is 43.24324% with 21 lines in your changes missing coverage. Please review.

Project coverage is 70.87%. Comparing base (c5fa777) to head (1747356).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
nipype/interfaces/diffusion_toolkit/odf.py 0.00% 6 Missing ⚠️
nipype/interfaces/io.py 33.33% 3 Missing and 1 partial ⚠️
nipype/interfaces/fsl/model.py 0.00% 3 Missing ⚠️
nipype/interfaces/cmtk/cmtk.py 0.00% 2 Missing ⚠️
nipype/interfaces/spm/model.py 0.00% 2 Missing ⚠️
nipype/interfaces/ants/segmentation.py 0.00% 0 Missing and 1 partial ⚠️
nipype/interfaces/diffusion_toolkit/dti.py 0.00% 1 Missing ⚠️
nipype/interfaces/freesurfer/preprocess.py 0.00% 1 Missing ⚠️
nipype/scripts/instance.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3680   +/-   ##
=======================================
  Coverage   70.86%   70.87%           
=======================================
  Files        1276     1276           
  Lines       59229    59233    +4     
  Branches     9812     9796   -16     
=======================================
+ Hits        41975    41979    +4     
- Misses      16079    16084    +5     
+ Partials     1175     1170    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bunch of comments. Hopefully not overlapping with other rules...

nipype/interfaces/base/core.py Outdated Show resolved Hide resolved
nipype/algorithms/modelgen.py Outdated Show resolved Hide resolved
nipype/interfaces/io.py Outdated Show resolved Hide resolved
nipype/interfaces/diffusion_toolkit/dti.py Outdated Show resolved Hide resolved
nipype/interfaces/diffusion_toolkit/odf.py Outdated Show resolved Hide resolved
nipype/interfaces/utility/wrappers.py Outdated Show resolved Hide resolved
nipype/interfaces/utility/wrappers.py Outdated Show resolved Hide resolved
nipype/pipeline/engine/utils.py Outdated Show resolved Hide resolved
nipype/pipeline/engine/utils.py Outdated Show resolved Hide resolved
nipype/utils/docparse.py Outdated Show resolved Hide resolved
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! One final suggestion.

nipype/pipeline/engine/utils.py Outdated Show resolved Hide resolved
C400 Unnecessary generator (rewrite as a `list` comprehension)
C409 Unnecessary `list` literal passed to `tuple()` (rewrite as a `tuple` literal)
C416 Unnecessary `list` comprehension (rewrite using `list()`)
C419 Unnecessary list comprehension
Co-authored-by: Chris Markiewicz <[email protected]>
@effigies effigies merged commit 25469f1 into nipy:master Oct 6, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants