From: John Mulligan Date: Wed, 13 Dec 2023 19:33:57 +0000 (-0500) Subject: pybind/mgr/orchestrator: workaround spurious mypy issue X-Git-Tag: testing/wip-batrick-testing-20240411.154038~548^2~9 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c14287f749e18467b3e2d0a1da0d5c21257d68b4;p=ceph-ci.git pybind/mgr/orchestrator: workaround spurious mypy issue 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 --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 0000d25dd49..8c496b777c5 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -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'