]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr/cephadm: fix typing issue
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 20 Jan 2024 15:45:46 +0000 (10:45 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 23 Jan 2024 14:45:40 +0000 (09:45 -0500)
commitf581ecf4b8866f2ba13f966af76baf0cef8ba500
tree502bbb2015283c8cb6532d6d707fc5211d4b584c
parente71e7c14453bc69f43a7c225ffe691c4ae5e8794
pybind/mgr/cephadm: fix typing issue

Found using mypy 0.990.
Newer mypy versions see the check as tautological because `self.func` is
typed as always being `Callable` and thus always true. I don't know if
the typing is wrong or if the if-block is tautological (and redundant).
For now, silence the error by using `getattr` instead of direct
attribute access.

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