From 7b2dd7eba4422338acd5e6d8e24f88114f8694e6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 19 Jan 2021 14:49:07 +0800 Subject: [PATCH] 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 --- src/pybind/mgr/ceph_module.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):...