]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/orchestrator: ignore Liskov substitution principle violation
authorSebastian Wagner <sebastian.wagner@suse.com>
Mon, 18 Jan 2021 15:27:18 +0000 (16:27 +0100)
committerJuan Miguel Olmo Martínez <jolmomar@redhat.com>
Mon, 25 Jan 2021 16:56:49 +0000 (17:56 +0100)
commitb79b8f649f988383a4b67090d037a79394ea0a7d
treeb347ab63f8dda2558cf0ee2f80017c91092b1497
parenta4b69d091a9b04abb2e059e231fd4a77cd34375e
mgr/orchestrator: ignore Liskov substitution principle violation

Right now, we're violating the Liskov substitution principle by deriving from `Orchestrator` but `process` takes a sub class of `Completion`:
See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

The idea is to make Orchestrator a type constructor with `CompletionT` as argument, but this is not supported by mypy: https://github.com/python/typing/issues/548

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 9923d2a1193c374b9c2e00b5ee69023cb72a9f00)
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/rook/module.py
src/pybind/mgr/test_orchestrator/module.py