Skip to content

Commit c199713

Browse files
author
Benjamin Moody
committed
Fix documentation of the base_time and base_date types.
The base_time and base_date attributes of the BaseRecord class, and the parameters to the BaseRecord/Record/MultiRecord constructors, must be a datetime.time object (or None) and a datetime.date object (or None.) The documentation of all three classes erroneously claimed these attributes were strings.
1 parent efca603 commit c199713

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

wfdb/io/record.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ class BaseRecord(object):
183183
The counter used at the start of the file.
184184
sig_len : int, optional
185185
The total length of the signal.
186-
base_time : str, optional
187-
A string of the record's start time in 24h 'HH:MM:SS(.ms)' format.
188-
base_date : str, optional
189-
A string of the record's start date in 'DD/MM/YYYY' format.
186+
base_time : datetime.time, optional
187+
The time of day at the beginning of the record.
188+
base_date : datetime.date, optional
189+
The date at the beginning of the record.
190190
comments : list, optional
191191
A list of string comments to be written to the header file.
192192
sig_name : str, optional
@@ -601,10 +601,10 @@ class Record(BaseRecord, _header.HeaderMixin, _signal.SignalMixin):
601601
The counter used at the start of the file.
602602
sig_len : int, optional
603603
The total length of the signal.
604-
base_time : str, optional
605-
A string of the record's start time in 24h 'HH:MM:SS(.ms)' format.
606-
base_date : str, optional
607-
A string of the record's start date in 'DD/MM/YYYY' format.
604+
base_time : datetime.time, optional
605+
The time of day at the beginning of the record.
606+
base_date : datetime.date, optional
607+
The date at the beginning of the record.
608608
file_name : str, optional
609609
The name of the file used for analysis.
610610
fmt : list, optional
@@ -901,10 +901,10 @@ class MultiRecord(BaseRecord, _header.MultiHeaderMixin):
901901
The counter used at the start of the file.
902902
sig_len : int, optional
903903
The total length of the signal.
904-
base_time : str, optional
905-
A string of the record's start time in 24h 'HH:MM:SS(.ms)' format.
906-
base_date : str, optional
907-
A string of the record's start date in 'DD/MM/YYYY' format.
904+
base_time : datetime.time, optional
905+
The time of day at the beginning of the record.
906+
base_date : datetime.date, optional
907+
The date at the beginning of the record.
908908
seg_name : str, optional
909909
The name of the segment.
910910
seg_len : int, optional
@@ -5053,10 +5053,10 @@ def wrsamp(
50535053
A list of integers specifying the digital baseline.
50545054
comments : list, optional
50555055
A list of string comments to be written to the header file.
5056-
base_time : str, optional
5057-
A string of the record's start time in 24h 'HH:MM:SS(.ms)' format.
5058-
base_date : str, optional
5059-
A string of the record's start date in 'DD/MM/YYYY' format.
5056+
base_time : datetime.time, optional
5057+
The time of day at the beginning of the record.
5058+
base_date : datetime.date, optional
5059+
The date at the beginning of the record.
50605060
write_dir : str, optional
50615061
The directory in which to write the files.
50625062

0 commit comments

Comments
 (0)