Skip to content

Commit 22d5dfc

Browse files
committed
Add type hints.
1 parent 620f801 commit 22d5dfc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/spikeinterface/core/baserecording.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def reset_times(self):
509509
rs.t_start = None
510510
rs.sampling_frequency = self.sampling_frequency
511511

512-
def shift_start_time(self, shift, segment_index=None):
512+
def shift_start_time(self, shift: int | float, segment_index: int | None = None) -> None:
513513
"""
514514
Shift the starting time of the times.
515515
@@ -536,15 +536,14 @@ def shift_start_time(self, shift, segment_index=None):
536536
else:
537537
rs.t_start += shift
538538

539-
def sample_index_to_time(self, sample_ind, segment_index=None):
540-
"""
541-
Transform sample index into time in seconds
542-
"""
539+
def sample_index_to_time(self, sample_ind: int, segment_index: int | None = None):
540+
""" """
543541
segment_index = self._check_segment_index(segment_index)
544542
rs = self._recording_segments[segment_index]
545543
return rs.sample_index_to_time(sample_ind)
546544

547-
def time_to_sample_index(self, time_s, segment_index=None):
545+
def time_to_sample_index(self, time_s: float, segment_index: int | None = None):
546+
""" """
548547
segment_index = self._check_segment_index(segment_index)
549548
rs = self._recording_segments[segment_index]
550549
return rs.time_to_sample_index(time_s)

0 commit comments

Comments
 (0)