]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: add a type annotation to the extra_args dict
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 28 Mar 2023 21:07:04 +0000 (17:07 -0400)
committerAfreen <afreen23.git@gmail.com>
Thu, 15 Feb 2024 08:29:26 +0000 (13:59 +0530)
This change makes this file pass mypy checking on mypy 0.981.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit bc65da0acdfbe99d847f8f304eb1e470b072561b)

src/pybind/mgr/mgr_module.py

index b8947bee381986f5a4615026e17c5c42163f4b80..a12d3d448e88949b6ce9b84eb7f1057161890bdf 100644 (file)
@@ -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