Skip to content

Commit e2ce76b

Browse files
author
Benjamin Moody
committed
check_read_inputs: eliminate "is True" and "is False".
Writing "if X is True" is almost always a mistake.
1 parent 0a2b75f commit e2ce76b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/record.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,12 @@ def check_read_inputs(self, sampfrom, sampto, channels, physical,
409409

410410
if return_res not in [64, 32, 16, 8]:
411411
raise ValueError("return_res must be one of the following: 64, 32, 16, 8")
412-
if physical is True and return_res == 8:
412+
if physical and return_res == 8:
413413
raise ValueError("return_res must be one of the following when physical is True: 64, 32, 16")
414414

415415
# Cannot expand multiple samples/frame for multi-segment records
416416
if isinstance(self, MultiRecord):
417-
if smooth_frames is False:
417+
if not smooth_frames:
418418
raise ValueError('This package version cannot expand all samples when reading multi-segment records. Must enable frame smoothing.')
419419

420420

0 commit comments

Comments
 (0)