Skip to content

Commit

Permalink
Make flake8 compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
withmywoessner committed Nov 20, 2023
1 parent e708465 commit fbdec77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions mne/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,8 @@ def _reject_setup(self, reject, flat):
continue
else:
raise ValueError(
'%s value must be a number >= 0 or a valid function, not "%s"'
'%s value must be a number >= 0 or a valid function,'
'not "%s"'
% (kind, val)
)

Expand Down Expand Up @@ -853,7 +854,8 @@ def _reject_setup(self, reject, flat):
reject[key] = old_reject[key]

if not is_callable:
# make sure new thresholds are at least as stringent as the old ones
# make sure new thresholds are at least as stringent
# as the old ones
for key in reject:
if key in old_reject and reject[key] > old_reject[key]:
raise ValueError(
Expand Down
6 changes: 4 additions & 2 deletions tutorials/preprocessing/20_rejecting_bad_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@
tmin=0,
tmax=1,
baseline=None,
reject=dict(eeg=lambda x: True if (np.max(x, axis=1) > 1e-2).any() else False),
reject=dict(
eeg=lambda x: True if (np.max(x, axis=1) > 1e-2).any() else False),
preload=True,
)
epochs.plot(scalings=dict(eeg=50e-5))
Expand All @@ -395,7 +396,8 @@
tmin=0,
tmax=1,
baseline=None,
reject=dict(eeg=lambda x: True if (np.median(x, axis=1) > 1e-4).any() else False),
reject=dict(
eeg=lambda x: True if (np.median(x, axis=1) > 1e-4).any() else False),
preload=True,
)
epochs.plot(scalings=dict(eeg=50e-5))
Expand Down

0 comments on commit fbdec77

Please sign in to comment.