Skip to content

Commit

Permalink
Simplify even further :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Feb 14, 2024
1 parent bc951b5 commit 07d61ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bidscoin/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -2003,9 +2003,8 @@ def increment_runindex(outfolder: Path, bidsname: str, run: Run) -> str:
LOGGER.verbose(f"Found run-2 files for <<>> index, renaming\n{runless_file} -> {run1_name}")
run1_file = (outfolder/run1_name).with_suffix(''.join(runless_file.suffixes))
runless_file.replace(run1_file)
if runless_file in targets:
targets.remove(runless_file)
targets.add(run1_file)
targets.discard(runless_file)
targets.add(run1_file)

return bidsname + bidsext

Expand Down

0 comments on commit 07d61ee

Please sign in to comment.