From: Joseph Sawaya Date: Thu, 15 Jul 2021 17:17:28 +0000 (-0400) Subject: mgr/rook: fix typing errors in Fetcher classes X-Git-Tag: v17.1.0~1144^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=10292074eaa4e87d02af53c7f56f70d04ba2d705;p=ceph.git mgr/rook: fix typing errors in Fetcher classes This commit fixes documentation errors caught by Jenkins having to do with the typing hints in DefaultFetcher and LSOFetcher. Signed-off-by: Joseph Sawaya --- diff --git a/src/pybind/mgr/rook/rook_cluster.py b/src/pybind/mgr/rook/rook_cluster.py index fec09dd9dc29..10d307d900ba 100644 --- a/src/pybind/mgr/rook/rook_cluster.py +++ b/src/pybind/mgr/rook/rook_cluster.py @@ -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: