Skip to content

Commit e25d760

Browse files
author
trevor.stout
committed
Linting
1 parent 433474e commit e25d760

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

batbot/spectrogram/__init__.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,13 @@ def compute_wrapper(
16101610
# Tighten the ranges by looking for substantial right-side skew (use stride for a smaller sampling window)
16111611
extra_buffer_pix = int(max(0.0, (time_buffer_ms - 1.0) / x_step_ms))
16121612
ranges = tighten_ranges(
1613-
stft_db, ranges, stride, duration, output_path=debug_path, extra_buffer_pix=extra_buffer_pix, quiet=quiet
1613+
stft_db,
1614+
ranges,
1615+
stride,
1616+
duration,
1617+
output_path=debug_path,
1618+
extra_buffer_pix=extra_buffer_pix,
1619+
quiet=quiet,
16141620
)
16151621
# Merge all range segments into contiguous range blocks
16161622
ranges = merge_ranges(ranges, stft_db.shape[1])
@@ -1904,14 +1910,20 @@ def compute_wrapper(
19041910
), 'lower frequency bands changed unexpectedly much when using original sample rate'
19051911
else:
19061912
assert all(
1907-
[np.abs(x - y) / x <= tol for x, y in zip(bands[-len(bands_origsr) :], bands_origsr)]
1913+
[
1914+
np.abs(x - y) / x <= tol
1915+
for x, y in zip(bands[-len(bands_origsr) :], bands_origsr)
1916+
]
19081917
), 'lower frequency bands changed unexpectedly much when using original sample rate'
19091918

19101919
# Create compressed spectrogram using segment start and stop times
19111920
segments_origsr = []
19121921
for segment_meta in metas:
19131922
start = max(0, int(np.round(segment_meta['segment start.ms'] / x_step_ms_origsr)))
1914-
end = min(stft_db_origsr.shape[1], int(np.round(segment_meta['segment end.ms'] / x_step_ms_origsr)))
1923+
end = min(
1924+
stft_db_origsr.shape[1],
1925+
int(np.round(segment_meta['segment end.ms'] / x_step_ms_origsr)),
1926+
)
19151927
segments_origsr.append(stft_db_origsr[:, start:end])
19161928
segments['stft_db_origsr'] = np.concatenate(segments_origsr, axis=1)
19171929

0 commit comments

Comments
 (0)