Skip to content

Commit

Permalink
FIX: Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Feb 24, 2024
1 parent 7410306 commit c06c0cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/source/v1.6.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
- The package build backend has been switched from `setuptools` to `hatchling`. (#825 by @hoechenberger)
- Code formatting now uses `ruff format` instead of `black` (#834, #838 by @larsoner)
- Code caching is now tested using GitHub Actions (#836 by @larsoner)
- Steps in the documentatino are now automatically parsed into flowcharts (#859 by @larsoner)
- Steps in the documentation are now automatically parsed into flowcharts (#859 by @larsoner)
8 changes: 4 additions & 4 deletions mne_bids_pipeline/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,10 @@ def _prep_out_files(
# Sanity check that we only ever write to the derivatives directory
if bids_only:
assert isinstance(fname, BIDSPath), (type(fname), fname)
if isinstance(fname, BIDSPath):
if fname.suffix not in ("raw", "epochs"):
# raw and epochs can split on write, and .save should check for us
assert fname.split is None, fname.split
# raw and epochs can split on write, and .save should check for us now, so
# we only need to check *other* types (these should never split)
if isinstance(fname, BIDSPath) and fname.suffix not in ("raw", "epo"):
assert fname.split is None, fname
fname = pathlib.Path(fname)
if not fname.is_relative_to(check_relative):
raise RuntimeError(
Expand Down

0 comments on commit c06c0cd

Please sign in to comment.