Skip to content

Commit 469b2ca

Browse files
committed
lints
1 parent 1af575b commit 469b2ca

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ctd/extras.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def extrap_sec(
6868
Extrapolated variable
6969
7070
"""
71-
from scipy.interpolate import interp1d
71+
from scipy.interpolate import interp1d # noqa: PLC0415
7272

7373
new_data1 = []
7474
for row in data:
@@ -138,8 +138,8 @@ def gen_topomask(
138138
André Palóczy Filho ([email protected]) -- October/2012
139139
140140
"""
141-
import gsw
142-
from scipy.interpolate import interp1d
141+
import gsw # noqa: PLC0415
142+
from scipy.interpolate import interp1d # noqa: PLC0415
143143

144144
h, lon, lat = list(map(np.asanyarray, (h, lon, lat)))
145145
# Distance in km.
@@ -160,7 +160,7 @@ def plot_section( # noqa: PLR0915
160160
**kw: dict,
161161
) -> tuple:
162162
"""Plot a sequence of CTD casts as a section."""
163-
import gsw
163+
import gsw # noqa: PLC0415
164164

165165
lon, lat, data = list(
166166
map(np.asanyarray, (self.lon, self.lat, self.to_numpy())),
@@ -298,7 +298,7 @@ def barrier_layer_thickness(sa: pd.Series, ct: pd.Series) -> pd.Series:
298298
using density.
299299
300300
"""
301-
import gsw
301+
import gsw # noqa: PLC0415
302302

303303
sigma_theta = gsw.sigma0(sa, ct)
304304
mask = mixed_layer_depth(ct)

ctd/processing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def _rolling_window(data: np.ndarray, block: int) -> np.ndarray:
1313
Using strides for an efficient moving average filter.
1414
1515
"""
16-
shape = data.shape[:-1] + (data.shape[-1] - block + 1, block)
16+
shape = *data.shape[:-1], *(data.shape[-1] - block + 1, block)
1717
strides = (*data.strides, data.strides[-1])
1818
return np.lib.stride_tricks.as_strided(data, shape=shape, strides=strides)
1919

@@ -80,7 +80,7 @@ def lp_filter(
8080
https://scipy-cookbook.readthedocs.io/items/FIRFilter.html
8181
8282
"""
83-
from scipy import signal
83+
from scipy import signal # noqa: PLC0415
8484

8585
# Butter is closer to what SBE is doing with their cosine filter.
8686
wn = (1.0 / time_constant) / (sample_rate * 2.0)

0 commit comments

Comments
 (0)