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: v17.2.8~507^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7562a5f5cbe85be5cc39eacafe99ff46ebf45bb4;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 b8947bee3819..a12d3d448e88 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