Skip to content

Commit f6ba197

Browse files
committed
fix logic in warning if no events are written
1 parent 548fdfc commit f6ba197

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mne_bids/read.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ def _read_events(events, event_id, raw, bids_path=None):
226226

227227
# Warn about missing events if not rest or empty-room data
228228
if (all_events.size == 0 and bids_path.task is not None) and (
229-
not bids_path.task.startswith("rest")
230-
or not (bids_path.subject == "emptyroom" and bids_path.task == "noise")
229+
not bids_path.task.startswith("rest") and
230+
not (bids_path.subject == "emptyroom" and bids_path.task == "noise")
231231
):
232232
warn(
233233
"No events found or provided. Please add annotations to the raw "

0 commit comments

Comments
 (0)