Skip to content

Commit 848abac

Browse files
pybind/mgr: disable mypy error in diskprediction_local module
Currently on python 3.12 mypy detects one of the variables used in the expression as an zero-element tuple. This module is not getting a lot of attention so I'm doing the bare minimum to stop the tests from failing here and silencing mypy with a magic comment. Signed-off-by: John Mulligan <[email protected]>
1 parent d7ef422 commit 848abac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pybind/mgr/diskprediction_local/predictor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def __preprocess(self, disk_days: Sequence[DevSmartT], manufacturer: str) -> Opt
168168
roll_window_size = 6
169169

170170
# rolling means generator
171-
dataset_size = disk_days_attrs.shape[0] - roll_window_size + 1
171+
dataset_size = disk_days_attrs.shape[0] - roll_window_size + 1 # type: ignore
172172
gen = (disk_days_attrs[i: i + roll_window_size, ...].mean(axis=0)
173173
for i in range(dataset_size))
174174
means = np.vstack(gen) # type: ignore

0 commit comments

Comments
 (0)