]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/volumes: add `deque` type
authorMichael Fritch <mfritch@suse.com>
Tue, 3 Mar 2020 15:18:19 +0000 (08:18 -0700)
committerMichael Fritch <mfritch@suse.com>
Thu, 5 Mar 2020 20:19:32 +0000 (13:19 -0700)
fixes mypy error:

volumes/fs/async_job.py: note: In member "__init__" of class "AsyncJobs":
volumes/fs/async_job.py:97: error: Need type annotation for 'q'

Fixes: https://tracker.ceph.com/issues/44393
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/volumes/fs/async_job.py

index a83fc6dc91698a757b4c1665eb3a47f1bcac9fdb..bb07fda6e3322f7e898f6a90037b363543cbb68b 100644 (file)
@@ -94,7 +94,7 @@ class AsyncJobs(object):
     def __init__(self, volume_client, name_pfx, nr_concurrent_jobs):
         self.vc = volume_client
         # queue of volumes for starting async jobs
-        self.q = deque()
+        self.q = deque() # type: deque
         # volume => job tracking
         self.jobs = {}
         # lock, cv for kickstarting jobs