8000 STY: Apply ruff/flake8-pie rules (PIE) by DimitriPapadopoulos · Pull Request #3678 · nipy/nipype · GitHub
[go: up one dir, main page]

Skip to content

STY: Apply ruff/flake8-pie rules (PIE) #3678

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

Merged
merged 5 commits into from
Oct 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
STY: Apply ruff/flake8-pie rule PIE810
PIE810 Call `endswith` once with a `tuple`
  • Loading branch information
DimitriPapadopoulos committed Oct 5, 2024
commit 39800373c645c0fdf6a40113ba0d68fc3920625d
4 changes: 1 addition & 3 deletions nipype/interfaces/dcm2nii.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,7 @@ def _parse_files(self, filenames):
for filename in filenames:
# search for relevant files, and sort accordingly
for fl in search_files(filename, outtypes, self.inputs.crop):
if (
fl.endswith((".nii", ".gz", ".nrrd", ".nhdr"))
):
if fl.endswith((".nii", ".gz", ".nrrd", ".nhdr")):
outfiles.append(fl)
elif fl.endswith(".bval"):
bvals.append(fl)
Expand Down
0