check_plan_change#
- scikitplot.agent.check_plan_change(current, proposed)[source]#
Refuse a plan change that would hide or rewrite progress.
- Parameters:
- currentsequence of PlanItem
The plan in force.
- proposedsequence of PlanItem
The replacement, already validated by
normalize_plan.
- Raises:
- ValueError
If an item of
currentis missing fromproposed, or adoneordroppeditem changes status or text.
- Parameters:
- Return type:
None
Examples
>>> old = [PlanItem("a", "read", "done")] >>> check_plan_change(old, [PlanItem("a", "read", "done"), PlanItem("b", "write")]) >>> check_plan_change(old, [PlanItem("b", "write")]) Traceback (most recent call last): ... ValueError: plan items ['a'] are missing; mark an item dropped instead of removing it.