Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 5, 2024
1 parent a87ce53 commit e2c0857
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions mne/io/cnt/cnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,10 @@ def _update_bad_span_onset(accept_reject, onset, duration, description):
accept = (event.KeyPad_Accept[0] & 0xF0) >> 4
# Lower nibble (4 bits) keypad button press
keypad = event.KeyPad_Accept[0] & 0x0F
if str(keypad) != '0':
if str(keypad) != "0":
description.append("KeyPad Response" + " " + str(keypad))
elif event.KeyBoard != 0:
description.append("Keyboard Response" +
" " + str(event.KeyBoard))
description.append("Keyboard Response" + " " + str(event.KeyBoard))
else:
description.append(str(event.StimType))

Expand Down
2 changes: 1 addition & 1 deletion mne/io/cnt/tests/test_cnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_auto_data():
with first, second, third:
raw = read_raw_cnt(input_fname=fname_bad_spans)
# Test that responses are read properly
assert 'KeyPad Response 1' in raw.annotations.description
assert "KeyPad Response 1" in raw.annotations.description
assert raw.info["bads"] == ["F8"]

with _no_parse, pytest.warns(RuntimeWarning, match="number of bytes"):
Expand Down

0 comments on commit e2c0857

Please sign in to comment.