Skip to content

Commit

Permalink
Update style (#482)
Browse files Browse the repository at this point in the history
Apply the changes that are demanded by black-24.4.0.
  • Loading branch information
tompollard authored Apr 19, 2024
2 parents 05b3fde + b7a8211 commit 0130d70
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions wfdb/io/convert/tff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
http://www.biomation.com/kin/me6000.htm
"""

import datetime
import os
import struct
Expand Down
1 change: 1 addition & 0 deletions wfdb/io/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This module will eventually replace _header.py
"""

import datetime
import re
from typing import List, Tuple
Expand Down
10 changes: 4 additions & 6 deletions wfdb/io/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions wfdb/io/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A module for general utility functions
"""

import math
import os

Expand Down
1 change: 1 addition & 0 deletions wfdb/plot/__init__.py
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions wfdb/processing/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions wfdb/processing/qrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 0130d70

Please sign in to comment.