Skip to content

Commit 0e8d213

Browse files
committed
STY: minor linting
1 parent cc88579 commit 0e8d213

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pylossless/flagging.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,17 @@ def load_from_raw(self, raw, events, config):
231231
sfreq = raw.info["sfreq"]
232232
tmax = config["epoching"]["epochs_args"]["tmax"]
233233
tmin = config["epoching"]["epochs_args"]["tmin"]
234-
starts = events[:, 0]/sfreq - tmin
235-
stops = events[:, 0]/sfreq + tmax
234+
starts = events[:, 0] / sfreq - tmin
235+
stops = events[:, 0] / sfreq + tmax
236236
for annot in raw.annotations:
237237
if annot["description"].upper().startswith("BAD_LL_"):
238238
onset = annot["onset"]
239-
offset = annot["onset"]+annot["duration"]
240-
mask = ((starts >= onset) & (starts < offset) |
241-
(stops > onset) & (stops <= offset) |
242-
(onset <= starts) & (offset >= stops))
239+
offset = annot["onset"] + annot["duration"]
240+
mask = (
241+
(starts >= onset) & (starts < offset)
242+
| (stops > onset) & (stops <= offset)
243+
| (onset <= starts) & (offset >= stops)
244+
)
243245
inds = np.where(mask)[0]
244246
desc = annot["description"].lower().replace("bad_ll_", "")
245247
if desc not in self:

0 commit comments

Comments
 (0)