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-simplify rules (SIM) #3676

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

Summary

Apply assorted flake8-simplify (SIM) rules.

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

Attention: Patch coverage is 5.81395% with 81 lines in your changes missing coverage. Please review.

Project coverage is 40.13%. Comparing base (4d1352a) to head (6542864).

Files with missing lines Patch % Lines
nipype/interfaces/fsl/model.py 0.00% 13 Missing and 1 partial ⚠️
nipype/interfaces/slicer/generate_classes.py 0.00% 10 Missing and 1 partial ⚠️
nipype/interfaces/dipy/tests/test_base.py 0.00% 8 Missing ⚠️
nipype/interfaces/cmtk/convert.py 0.00% 7 Missing ⚠️
nipype/interfaces/nitime/analysis.py 0.00% 6 Missing and 1 partial ⚠️
nipype/interfaces/cmtk/cmtk.py 0.00% 6 Missing ⚠️
nipype/algorithms/misc.py 0.00% 4 Missing ⚠️
nipype/interfaces/cmtk/nx.py 0.00% 4 Missing ⚠️
nipype/interfaces/io.py 0.00% 3 Missing ⚠️
nipype/interfaces/afni/model.py 0.00% 2 Missing ⚠️
... and 14 more

❗ There is a different number of reports uploaded between BASE (4d1352a) and HEAD (6542864). Click for more details.

HEAD has 62 uploads less than BASE
Flag BASE (4d1352a) HEAD (6542864)
69 7
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3676       +/-   ##
===========================================
- Coverage   70.83%   40.13%   -30.70%     
===========================================
  Files        1276     1276               
  Lines       59314    59284       -30     
  Branches     9824     9825        +1     
===========================================
- Hits        42013    23793    -18220     
- Misses      16125    35323    +19198     
+ Partials     1176      168     -1008     

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

SIM101 Multiple `isinstance` calls for expression, merge into a single call
SIM103 Return the condition directly
SIM113 Use `enumerate()` for index variable in `for` loop
SIM115 Use a context manager for opening files
SIM118 Use `key in dict` instead of `key in dict.keys()`
SIM201 Use `... != ...` instead of `not ... == ...`
SIM401 Use `.get()` instead of an `if` block
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.

1 participant