]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr/snap-schedule: add typing annotations
authorKefu Chai <kchai@redhat.com>
Fri, 29 Jan 2021 05:37:54 +0000 (13:37 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 29 Jan 2021 11:42:32 +0000 (19:42 +0800)
commit80cbf407c2d91c4fbe0a4f432497165984832b79
tree4491fe98b74c1b4894e377de98446922eabd3eda
parent9d888ee42cfc5c71834f8460c08a0855ef20efd0
pybind/mgr/snap-schedule: add typing annotations

please note, the behavior of `updates_schedule_db()` is changed so that
it now returns the return value of the decorated function. this change
makes it a real decorator which keeps the signature of the decorated
function unchanged. the reason why we need this change is that mypy does
not allow us to match the parameter pack of a Callable at the time of
writing.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mypy.ini
src/pybind/mgr/snap_schedule/fs/schedule.py
src/pybind/mgr/snap_schedule/fs/schedule_client.py
src/pybind/mgr/snap_schedule/module.py