From 848abacfc7b9e532d362be02d7a3486f7f633f37 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 13 Jun 2025 18:05:50 -0400 Subject: [PATCH] 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 --- src/pybind/mgr/diskprediction_local/predictor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/diskprediction_local/predictor.py b/src/pybind/mgr/diskprediction_local/predictor.py index 3bbe7a4b7f232..858c52965941c 100644 --- a/src/pybind/mgr/diskprediction_local/predictor.py +++ b/src/pybind/mgr/diskprediction_local/predictor.py @@ -168,7 +168,7 @@ class RHDiskFailurePredictor(Predictor): roll_window_size = 6 # rolling means generator - dataset_size = disk_days_attrs.shape[0] - roll_window_size + 1 + dataset_size = disk_days_attrs.shape[0] - roll_window_size + 1 # type: ignore gen = (disk_days_attrs[i: i + roll_window_size, ...].mean(axis=0) for i in range(dataset_size)) means = np.vstack(gen) # type: ignore -- 2.39.5