From: John Mulligan Date: Fri, 13 Jun 2025 22:05:50 +0000 (-0400) Subject: pybind/mgr: disable mypy error in diskprediction_local module X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=848abacfc7b9e532d362be02d7a3486f7f633f37;p=ceph.git 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 --- 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