From fbdec770d37cac018f3d197e5602603643cb51dc Mon Sep 17 00:00:00 2001 From: withmywoessner Date: Mon, 20 Nov 2023 10:24:39 -0600 Subject: [PATCH] Make flake8 compliant --- mne/epochs.py | 6 ++++-- tutorials/preprocessing/20_rejecting_bad_data.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mne/epochs.py b/mne/epochs.py index 05cfbcfb84e..e525ce2f4c5 100644 --- a/mne/epochs.py +++ b/mne/epochs.py @@ -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) ) @@ -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( diff --git a/tutorials/preprocessing/20_rejecting_bad_data.py b/tutorials/preprocessing/20_rejecting_bad_data.py index dde24ab38b6..bc7f4bba796 100644 --- a/tutorials/preprocessing/20_rejecting_bad_data.py +++ b/tutorials/preprocessing/20_rejecting_bad_data.py @@ -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)) @@ -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))