From: John Mulligan Date: Tue, 28 Mar 2023 21:07:04 +0000 (-0400) Subject: pybind/mgr: add a type annotation to the extra_args dict X-Git-Tag: v18.1.0~130^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9e87d07c427fc8fd2a7b9b94213cb6365473edcd;p=ceph.git pybind/mgr: add a type annotation to the extra_args dict This change makes this file pass mypy checking on mypy 0.981. Signed-off-by: John Mulligan (cherry picked from commit bc65da0acdfbe99d847f8f304eb1e470b072561b) --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 2bbdb4bdd5c8..48e682fff233 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -342,7 +342,7 @@ def _extract_target_func( wrapped = getattr(f, "__wrapped__", None) if not wrapped: return f, {} - extra_args = {} + extra_args: Dict[str, Any] = {} while wrapped is not None: extra_args.update(getattr(f, "extra_args", {})) f = wrapped