Skip to content

Commit 1bc7d9b

Browse files
committed
Fix style
1 parent 5539c02 commit 1bc7d9b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/test_archive.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,14 @@ def test_archive_missing_file_error(temp_record):
182182
zf_name = [name for name in zf.namelist() if name.endswith(".dat")][0]
183183
zf.fp = None # Prevent auto-close bug in some zipfile implementations
184184
os.rename(archive_path, archive_path + ".bak")
185-
with zipfile.ZipFile(archive_path + ".bak", "r") as zin, zipfile.ZipFile(
186-
archive_path, "w"
187-
) as zout:
185+
with (
186+
zipfile.ZipFile(archive_path + ".bak", "r") as zin,
187+
zipfile.ZipFile(archive_path, "w") as zout,
188+
):
188189
for item in zin.infolist():
189190
if not item.filename.endswith(".dat"):
190191
zout.writestr(item, zin.read(item.filename))
191192
os.remove(archive_path + ".bak")
192193

193-
with pytest.raises(FileNotFoundError, match=".*\.dat.*"):
194+
with pytest.raises(FileNotFoundError, match=r".*\.dat.*"):
194195
rdrecord(archive_path)

wfdb/io/record.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,9 +2786,7 @@ def wfdbtime(record_name, input_times, pn_dir=None):
27862786
)
27872787
if not times.startswith("s"):
27882788
sample_num = int(
2789-
sum(
2790-
x * 60**i for i, x in enumerate([seconds, minutes, hours])
2791-
)
2789+
sum(x * 60**i for i, x in enumerate([seconds, minutes, hours]))
27922790
* record.fs
27932791
)
27942792
sample_num = "s" + str(sample_num)

0 commit comments

Comments
 (0)