]> 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)
committerAdam King <adking@redhat.com>
Tue, 25 Apr 2023 12:36:55 +0000 (08:36 -0400)
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 2bbdb4bdd5c87364c0294e32a384b93d61ad85d7..48e682fff23374f24162b4238ea3122fc99e475b 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