summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/cephadm/utils.py
diff options
context:
space:
mode:
authorSebastian Wagner <sebastian.wagner@suse.com>2020-12-10 15:53:00 +0100
committerSebastian Wagner <sebastian.wagner@suse.com>2020-12-10 15:53:00 +0100
commita823ee6b1f5a8eb2030c1edf0a7014f86eb719ab (patch)
tree165d6c68268c74d5280dadeea99db4fc00ec0a97 /src/pybind/mgr/cephadm/utils.py
parentMerge pull request #38524 from tchaikov/wip-crimson-qa-rbd (diff)
downloadceph-a823ee6b1f5a8eb2030c1edf0a7014f86eb719ab.tar.xz
ceph-a823ee6b1f5a8eb2030c1edf0a7014f86eb719ab.zip
mgr/cephadm: disallow_untyped_defs=True
simplifies mypy.ini Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Diffstat (limited to 'src/pybind/mgr/cephadm/utils.py')
-rw-r--r--src/pybind/mgr/cephadm/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pybind/mgr/cephadm/utils.py b/src/pybind/mgr/cephadm/utils.py
index 03a28fbd9ef..752031a5037 100644
--- a/src/pybind/mgr/cephadm/utils.py
+++ b/src/pybind/mgr/cephadm/utils.py
@@ -4,7 +4,7 @@ import json
import datetime
from enum import Enum
from functools import wraps
-from typing import Optional, Callable, TypeVar, List, NewType, TYPE_CHECKING
+from typing import Optional, Callable, TypeVar, List, NewType, TYPE_CHECKING, Any
from orchestrator import OrchestratorError
if TYPE_CHECKING:
@@ -41,7 +41,7 @@ def name_to_config_section(name: str) -> ConfEntity:
def forall_hosts(f: Callable[..., T]) -> Callable[..., List[T]]:
@wraps(f)
- def forall_hosts_wrapper(*args) -> List[T]:
+ def forall_hosts_wrapper(*args: Any) -> List[T]:
from cephadm.module import CephadmOrchestrator
# Some weired logic to make calling functions with multiple arguments work.
@@ -53,7 +53,7 @@ def forall_hosts(f: Callable[..., T]) -> Callable[..., List[T]]:
else:
assert 'either f([...]) or self.f([...])'
- def do_work(arg):
+ def do_work(arg: Any) -> T:
if not isinstance(arg, tuple):
arg = (arg, )
try: