From: Kefu Chai Date: Tue, 19 Jan 2021 06:49:07 +0000 (+0800) Subject: pybind/mgr: correct annotation for BasePyOSDMap._apply_incremental() X-Git-Tag: v16.2.0~230^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be5fc929bcf5c5d55665d12caa7401edfa69e935;p=ceph.git pybind/mgr: correct annotation for BasePyOSDMap._apply_incremental() it's incorrect. as the underlying C implementation, "osdmap_apply_incremental()", actually expects an instance of `BasePyOSDMapIncrementalType`. which is mapped to `BasePyOSDMapIncremental` in Python. and this class is wrapped using `OSDMapIncremental` in mgr_module.py. Signed-off-by: Kefu Chai (cherry picked from commit 7b2dd7eba4422338acd5e6d8e24f88114f8694e6) --- diff --git a/src/pybind/mgr/ceph_module.pyi b/src/pybind/mgr/ceph_module.pyi index dfa4a3dff44..c0390908a36 100644 --- a/src/pybind/mgr/ceph_module.pyi +++ b/src/pybind/mgr/ceph_module.pyi @@ -7,7 +7,7 @@ class BasePyOSDMap(object): def _get_crush_version(self): ... def _dump(self):... def _new_incremental(self):... - def _apply_incremental(self, inc:int):... + def _apply_incremental(self, inc: 'BasePyOSDMapIncremental'):... def _get_crush(self):... def _get_pools_by_take(self, take):... def _calc_pg_upmaps(self, inc, max_deviation, max_iterations, pool):...