diff --git a/wfdb/io/convert/tff.py b/wfdb/io/convert/tff.py index c18c02d9..355a3eaf 100644 --- a/wfdb/io/convert/tff.py +++ b/wfdb/io/convert/tff.py @@ -4,6 +4,7 @@ http://www.biomation.com/kin/me6000.htm """ + import datetime import os import struct diff --git a/wfdb/io/header.py b/wfdb/io/header.py index 0f0f7eed..98a1627b 100644 --- a/wfdb/io/header.py +++ b/wfdb/io/header.py @@ -4,6 +4,7 @@ This module will eventually replace _header.py """ + import datetime import re from typing import List, Tuple diff --git a/wfdb/io/record.py b/wfdb/io/record.py index dfe3b987..09496396 100644 --- a/wfdb/io/record.py +++ b/wfdb/io/record.py @@ -411,9 +411,9 @@ def check_field(self, field, required_channels="all"): field_name=field, ndim=1, parent_class=( - lambda f: np.integer - if f == "e_d_signal" - else np.floating + lambda f: ( + np.integer if f == "e_d_signal" else np.floating + ) )(field), channel_num=ch, ) @@ -2725,9 +2725,7 @@ def wfdbtime(record_name, input_times, pn_dir=None): ) if not times.startswith("s"): sample_num = int( - sum( - x * 60**i for i, x in enumerate([seconds, minutes, hours]) - ) + sum(x * 60**i for i, x in enumerate([seconds, minutes, hours])) * record.fs ) sample_num = "s" + str(sample_num) diff --git a/wfdb/io/util.py b/wfdb/io/util.py index 1b3f4ad9..07b06dcc 100644 --- a/wfdb/io/util.py +++ b/wfdb/io/util.py @@ -1,6 +1,7 @@ """ A module for general utility functions """ + import math import os diff --git a/wfdb/plot/__init__.py b/wfdb/plot/__init__.py index 5210346a..bf801834 100644 --- a/wfdb/plot/__init__.py +++ b/wfdb/plot/__init__.py @@ -1,4 +1,5 @@ """ The plot subpackage contains tools for plotting signals and annotations. """ + from wfdb.plot.plot import plot_items, plot_wfdb, plot_all_records diff --git a/wfdb/processing/evaluate.py b/wfdb/processing/evaluate.py index d2c86202..3e960286 100644 --- a/wfdb/processing/evaluate.py +++ b/wfdb/processing/evaluate.py @@ -204,9 +204,9 @@ def compare(self): ) # Assign the reference-test pair if close enough if smallest_samp_diff < self.window_width: - self.matching_sample_nums[ - ref_samp_num - ] = closest_samp_num + self.matching_sample_nums[ref_samp_num] = ( + closest_samp_num + ) # Set the starting test sample number to inspect # for the next reference sample. test_samp_num = closest_samp_num + 1 diff --git a/wfdb/processing/qrs.py b/wfdb/processing/qrs.py index 37c726bc..052f1dd9 100644 --- a/wfdb/processing/qrs.py +++ b/wfdb/processing/qrs.py @@ -1540,10 +1540,12 @@ def find_missing(r, p): tann = GQRS.Annotation( tmp_time, "TWAVE", - 1 - if tmp_time - > self.annot.time + self.c.rtmean - else 0, + ( + 1 + if tmp_time + > self.annot.time + self.c.rtmean + else 0 + ), rtdmin, ) # if self.state == "RUNNING":