]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/cephadm/inventory: cast variable to expected type
authorKefu Chai <kchai@redhat.com>
Tue, 19 Jan 2021 17:24:01 +0000 (01:24 +0800)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 29 Jan 2021 12:42:38 +0000 (13:42 +0100)
commiteef18040c5bcfe2af2a332f6847736bf420b583f
treee3615d8e3348a5a01a2a42bb9a3378661b4607f2
parent958f76f4d19a28617275fcc4531f55281dc1476a
pybind/mgr/cephadm/inventory: cast variable to expected type

to silence mypy warnings like:

cephadm/module.py:55: note: In module imported here,
cephadm/__init__.py:6: note: ... from here:
cephadm/inventory.py: note: In member "load" of class "SpecStore":
cephadm/inventory.py:130: error: Invalid index type "str" for "str"; expected type "Union[int, slice]"
cephadm/inventory.py:131: error: Invalid index type "str" for "str"; expected type "Union[int, slice]"

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cb3a50cd3626d6a67beb39d2c9dd897f43379d70)
src/pybind/mgr/cephadm/inventory.py