]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr/dashboard: correct type signature of CRUDEndpoint arg
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 20 Jan 2024 16:07:54 +0000 (11:07 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 24 Jan 2024 18:33:29 +0000 (13:33 -0500)
commit86f23452752032f6768d312e2d772dca8b3c6beb
treedf17a07b33ec28cda53846b2bf95a044efc1ffe7
parent1b5a12b5699f5bbaa0a03f706c6b4045b79a4f38
pybind/mgr/dashboard: correct type signature of CRUDEndpoint arg

Typing issue was found by mypy 1.5.1. The type only accepted values
of str but based on the data and code using set_column data the
boolean assignments to the 'isHidden' key were correct and so
I updated the type to also accept bool.

A more correct fix might be to use typing.TypedDict - this would
require python 3.8 (or typing extensions) and someone more familiar
with the dashboard code :-)

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/dashboard/controllers/_crud.py