Skip to content

Commit 0130d70

Browse files
authored
Update style (#482)
Apply the changes that are demanded by black-24.4.0.
2 parents 05b3fde + b7a8211 commit 0130d70

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

wfdb/io/convert/tff.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
http://www.biomation.com/kin/me6000.htm
55
66
"""
7+
78
import datetime
89
import os
910
import struct

wfdb/io/header.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
This module will eventually replace _header.py
55
66
"""
7+
78
import datetime
89
import re
910
from typing import List, Tuple

wfdb/io/record.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ def check_field(self, field, required_channels="all"):
411411
field_name=field,
412412
ndim=1,
413413
parent_class=(
414-
lambda f: np.integer
415-
if f == "e_d_signal"
416-
else np.floating
414+
lambda f: (
415+
np.integer if f == "e_d_signal" else np.floating
416+
)
417417
)(field),
418418
channel_num=ch,
419419
)
@@ -2725,9 +2725,7 @@ def wfdbtime(record_name, input_times, pn_dir=None):
27252725
)
27262726
if not times.startswith("s"):
27272727
sample_num = int(
2728-
sum(
2729-
x * 60**i for i, x in enumerate([seconds, minutes, hours])
2730-
)
2728+
sum(x * 60**i for i, x in enumerate([seconds, minutes, hours]))
27312729
* record.fs
27322730
)
27332731
sample_num = "s" + str(sample_num)

wfdb/io/util.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
A module for general utility functions
33
"""
4+
45
import math
56
import os
67

wfdb/plot/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""
22
The plot subpackage contains tools for plotting signals and annotations.
33
"""
4+
45
from wfdb.plot.plot import plot_items, plot_wfdb, plot_all_records

wfdb/processing/evaluate.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ def compare(self):
204204
)
205205
# Assign the reference-test pair if close enough
206206
if smallest_samp_diff < self.window_width:
207-
self.matching_sample_nums[
208-
ref_samp_num
209-
] = closest_samp_num
207+
self.matching_sample_nums[ref_samp_num] = (
208+
closest_samp_num
209+
)
210210
# Set the starting test sample number to inspect
211211
# for the next reference sample.
212212
test_samp_num = closest_samp_num + 1

wfdb/processing/qrs.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -1540,10 +1540,12 @@ def find_missing(r, p):
15401540
tann = GQRS.Annotation(
15411541
tmp_time,
15421542
"TWAVE",
1543-
1
1544-
if tmp_time
1545-
> self.annot.time + self.c.rtmean
1546-
else 0,
1543+
(
1544+
1
1545+
if tmp_time
1546+
> self.annot.time + self.c.rtmean
1547+
else 0
1548+
),
15471549
rtdmin,
15481550
)
15491551
# if self.state == "RUNNING":

0 commit comments

Comments
 (0)