From: Sebastian Wagner Date: Fri, 22 Jan 2021 10:32:40 +0000 (+0100) Subject: mgr/cephadm: Minor pep8 fix X-Git-Tag: v17.0.0~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2df47b88abd00aeee9153e8f9404b33f0c3a1d13;p=ceph.git mgr/cephadm: Minor pep8 fix Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index fe65012285f..cc726d52d7d 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -24,7 +24,8 @@ from typing import TypeVar, Generic, List, Optional, Union, Tuple, Iterator, Cal try: from typing import Protocol # Protocol was added in Python 3.8 except ImportError: - class Protocol: pass # type: ignore + class Protocol: # type: ignore + pass import yaml @@ -116,6 +117,7 @@ def handle_exception(prefix: str, perm: str, func: FuncT) -> FuncT: class InnerCliCommandCallable(Protocol): def __call__(self, prefix: str) -> Callable[[FuncT], FuncT]: ... + def _cli_command(perm: str) -> InnerCliCommandCallable: def inner_cli_command(prefix: str) -> Callable[[FuncT], FuncT]: return lambda func: handle_exception(prefix, perm, func) @@ -666,6 +668,7 @@ def _hide_in_features(f: FuncT) -> FuncT: f._hide_in_features = True # type: ignore return f + class Orchestrator(object): """ Calls in this class may do long running remote operations, with time