Skip to content

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 30.00000% with 63 lines in your changes missing coverage. Please review.

Project coverage is 70.89%. Comparing base (6ac81ca) to head (d040d84).
Report is 144 commits behind head on master.

Files with missing lines Patch % Lines
nipype/interfaces/slicer/generate_classes.py 0.00% 12 Missing and 1 partial ⚠️
nipype/interfaces/fsl/model.py 21.42% 10 Missing and 1 partial ⚠️
nipype/interfaces/cmtk/convert.py 0.00% 7 Missing ⚠️
nipype/interfaces/cmtk/cmtk.py 0.00% 6 Missing ⚠️
nipype/interfaces/cmtk/nx.py 0.00% 6 Missing ⚠️
nipype/algorithms/misc.py 0.00% 4 Missing ⚠️
nipype/interfaces/io.py 0.00% 3 Missing ⚠️
nipype/interfaces/afni/model.py 0.00% 2 Missing ⚠️
nipype/utils/draw_gantt_chart.py 0.00% 2 Missing ⚠️
nipype/interfaces/afni/utils.py 0.00% 1 Missing ⚠️
... and 8 more
Additional details and impacted files
@@ Coverage Diff @@ ## master #3676 +/- ## ========================================== + Coverage 70.87% 70.89% +0.02%  ========================================== Files 1276 1276 Lines 59238 59209 -29 Branches 9812 9814 +2 ========================================== - Hits 41984 41977 -7  + Misses 16079 16061 -18  + Partials 1175 1171 -4 

☔ 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.

Caught a couple new things.

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.

Needs a merge conflict resolved, but otherwise good to go.

DimitriPapadopoulos and others added 8 commits October 6, 2024 17:58
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
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
@effigies effigies merged commit ccec546 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

2 participants