]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: fix typing errors in Fetcher classes
authorJoseph Sawaya <jsawaya@redhat.com>
Thu, 15 Jul 2021 17:17:28 +0000 (13:17 -0400)
committerJoseph Sawaya <jsawaya@redhat.com>
Thu, 15 Jul 2021 17:17:28 +0000 (13:17 -0400)
This commit fixes documentation errors caught by Jenkins having to do with the typing hints
in DefaultFetcher and LSOFetcher.

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
src/pybind/mgr/rook/rook_cluster.py

index fec09dd9dc29702a97a128d7d191e5037626a0f5..10d307d900ba076afe1d64766d9fe5f7a4f8f443 100644 (file)
@@ -90,7 +90,7 @@ def threaded(f: Callable[..., None]) -> Callable[..., threading.Thread]:
 
 
 class DefaultFetcher():
-    def __init__(self, storage_class: str, coreV1_api: client.CoreV1Api):
+    def __init__(self, storage_class: str, coreV1_api: 'client.CoreV1Api'):
         self.storage_class = storage_class
         self.coreV1_api = coreV1_api
 
@@ -141,7 +141,7 @@ class DefaultFetcher():
         
 
 class LSOFetcher(DefaultFetcher):
-    def __init__(self, storage_class: str, coreV1_api: client.CoreV1Api, customObjects_api: client.CustomObjectsApi, nodenames: Optional[List[str]] = None):
+    def __init__(self, storage_class: 'str', coreV1_api: 'client.CoreV1Api', customObjects_api: 'client.CustomObjectsApi', nodenames: 'Optional[List[str]]' = None):
         super().__init__(storage_class, coreV1_api)
         self.customObjects_api = customObjects_api
         self.nodenames = nodenames
@@ -153,7 +153,7 @@ class LSOFetcher(DefaultFetcher):
                                                  version="v1alpha1",
                                                  plural="localvolumediscoveryresults")
 
-    def predicate(self, item: client.V1ConfigMapList) -> bool:
+    def predicate(self, item: 'client.V1ConfigMapList') -> bool:
             if self.nodenames is not None:
                 return item['spec']['nodeName'] in self.nodenames
             else: