From ac02377190c23b5c5ccfac8d934dec8a2220548e Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Tue, 3 Mar 2020 08:21:18 -0700 Subject: [PATCH] mgr/volumes: skip type checking on RTimer class Unclear why mypy does not like this: volumes/fs/operations/volume.py: note: In member "run" of class "RTimer": volumes/fs/operations/volume.py:118: error: "RTimer" has no attribute "finished" volumes/fs/operations/volume.py:119: error: "RTimer" has no attribute "finished" volumes/fs/operations/volume.py:119: error: "RTimer" has no attribute "interval" volumes/fs/operations/volume.py:120: error: "RTimer" has no attribute "function" volumes/fs/operations/volume.py:120: error: "RTimer" has no attribute "args" volumes/fs/operations/volume.py:120: error: "RTimer" has no attribute "kwargs" volumes/fs/operations/volume.py:121: error: "RTimer" has no attribute "finished" Fixes: https://tracker.ceph.com/issues/44393 Signed-off-by: Michael Fritch --- src/pybind/mgr/volumes/fs/operations/volume.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pybind/mgr/volumes/fs/operations/volume.py b/src/pybind/mgr/volumes/fs/operations/volume.py index 03b1face0c6..417404532ee 100644 --- a/src/pybind/mgr/volumes/fs/operations/volume.py +++ b/src/pybind/mgr/volumes/fs/operations/volume.py @@ -5,6 +5,7 @@ import sys from contextlib import contextmanager from threading import Lock, Condition +from typing import no_type_check if sys.version_info >= (3, 3): from threading import Timer @@ -109,6 +110,7 @@ class ConnectionPool(object): """ recurring timer variant of Timer """ + @no_type_check def run(self): try: while not self.finished.is_set(): -- 2.39.5