]> 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)
committerKefu Chai <kchai@redhat.com>
Tue, 26 Jan 2021 10:02:24 +0000 (18:02 +0800)
commitcb3a50cd3626d6a67beb39d2c9dd897f43379d70
treed9c9cd4d3ad4007cfe26c0c5d680ee97c485950f
parentcb2de05a39b28342fdf44688cd0d1c3e424a02ff
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>
src/pybind/mgr/cephadm/inventory.py