Skip to content

Commit b26be18

Browse files
authored
Merge pull request #1673 from zm711/formatspikegadgettest
Black Formatting Manually
2 parents b87b8f2 + d7cfa43 commit b26be18

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

neo/rawio/blackrockrawio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ def _parse_header(self):
276276
self.internal_unit_ids = [] # pair of chan['packet_id'], spikes['unit_class_nb']
277277
for i in range(len(self.__nev_ext_header[b"NEUEVWAV"])):
278278

279-
# electrode_id values are stored at uint16 which can overflow when
280-
# multiplying by 1000 below. We convert to a regular python int which
279+
# electrode_id values are stored at uint16 which can overflow when
280+
# multiplying by 1000 below. We convert to a regular python int which
281281
# won't overflow
282282
channel_id = int(self.__nev_ext_header[b"NEUEVWAV"]["electrode_id"][i])
283283

neo/rawio/spikegadgetsrawio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ def _parse_header(self):
227227
if num_ephy_channels % num_chan_per_chip == 0:
228228
all_hw_chans = [int(schan.attrib["hwChan"]) for trode in sconf for schan in trode]
229229
missing_hw_chans = set(range(num_ephy_channels)) - set(all_hw_chans)
230-
channel_ids = self._produce_ephys_channel_ids(num_ephy_channels_xml, num_chan_per_chip, missing_hw_chans)
230+
channel_ids = self._produce_ephys_channel_ids(
231+
num_ephy_channels_xml, num_chan_per_chip, missing_hw_chans
232+
)
231233
raw_channel_ids = False
232234
else:
233235
raw_channel_ids = True

neo/rawio/spikeglxrawio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ def get_segment_tuple(info):
376376
for info in info_list:
377377
info["seg_index"] = segment_tuple_to_segment_index[get_segment_tuple(info)]
378378

379-
380379
for info in info_list:
381380
# device_kind is imec, nidq
382381
if info.get("device_kind") == "imec":

neo/test/generate_datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def random_segment():
165165
rec_datetime=random_datetime(),
166166
**random_annotations(4),
167167
)
168-
168+
169169
n_sigs = random.randint(0, 5)
170170
for i in range(n_sigs):
171171
seg.analogsignals.append(random_signal())

neo/test/rawiotest/test_spikegadgetsrawio.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ class TestSpikeGadgetsRawIO(
2121
def test_parse_header_missing_channels(self):
2222

2323
file_path = Path(self.get_local_path("spikegadgets/SL18_D19_S01_F01_BOX_SLP_20230503_112642_stubbed.rec"))
24-
reader = SpikeGadgetsRawIO(filename = file_path)
24+
reader = SpikeGadgetsRawIO(filename=file_path)
2525
reader.parse_header()
2626

2727
assert_array_equal(
28-
reader.header['signal_channels']['id'],
28+
reader.header["signal_channels"]["id"],
29+
# fmt: off
2930
[
3031
'ECU_Ain1', 'ECU_Ain2', 'ECU_Ain3', 'ECU_Ain4', 'ECU_Ain5', 'ECU_Ain6',
3132
'ECU_Ain7', 'ECU_Ain8', 'ECU_Aout1', 'ECU_Aout2', 'ECU_Aout3', 'ECU_Aout4', '0',
@@ -46,6 +47,7 @@ def test_parse_header_missing_channels(self):
4647
'218', '250', '27', '59', '91', '123', '155', '187', '219', '251', '28', '60', '92',
4748
'156', '188', '220', '252', '29', '61', '93', '125', '157', '189', '221', '253', '30',
4849
'62', '94', '158', '190', '222', '254', '31', '63', '95', '127', '159', '191', '223',
49-
'255',
50+
'255'
5051
]
52+
# fmt: on
5153
)

0 commit comments

Comments
 (0)