]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
pybind/mgr/orchestrator: workaround spurious mypy issue
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 13 Dec 2023 19:33:57 +0000 (14:33 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 23 Jan 2024 14:45:40 +0000 (09:45 -0500)
When run locally mypy complains about the `name` field, possibly due to
us using an old mypy version on newer versions of python (we're stuck on
a Sept. 2022 version if you weren't aware). However, this could still be
an issue in mypy as there are open issues related to the `.name` field
of an enum. Regardless, we wouldn't know - so just work around it.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/orchestrator/module.py

index 0000d25dd49cdb9b4fd21a0a157cccc40e24d3ce..8c496b777c5e92bed2d1c98942cac5dfb392327e 100644 (file)
@@ -139,7 +139,7 @@ yaml.add_representer(HostDetails, HostDetails.yaml_representer)
 class DaemonFields(enum.Enum):
     service_name = 'service_name'
     daemon_type = 'daemon_type'
-    name = 'name'
+    name = 'name'  # type: ignore
     host = 'host'
     status = 'status'
     refreshed = 'refreshed'