]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr: Add ceph_module.pyi to improve type checking
authorSebastian Wagner <sebastian.wagner@suse.com>
Mon, 6 Jan 2020 14:00:13 +0000 (15:00 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Thu, 23 Jan 2020 16:34:22 +0000 (17:34 +0100)
commit21ba22097eec03a2a0cb3d4724f75adf519e91fc
tree4ffaff2309e888dbc57be1fe975baf5ac4d19a82
parentb5f42f5f95a8dc09050beb27511f0e56273f9856
pybind/mgr: Add ceph_module.pyi to improve type checking

ceph_module.pyi is an interface definition of classes that are generated within C++.
Used by mypy to do proper type checking of mgr modules.
Without this file, all classes have undefined base classes.

Now, we're also finding accesses to undefinied class properties.

Secondly, this also improves the development experience when using IDEs.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/CMakeLists.txt
src/pybind/mgr/ceph_module.pyi [new file with mode: 0644]
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/mgr_module.py