MLC109: empty AnimationGroup / Succession¶
qual reports MLC109 when AnimationGroup(...) or
Succession(...) is constructed with zero positional animation arguments.
Keyword arguments such as lag_ratio configure timing but contribute no
animations, so the group animates nothing.
Constructing the empty group is not itself an error in Manim 0.20.
AnimationGroup.build_animations_with_timings returns early when there are
zero members and init_run_time takes max(..., default=0), so the object is
built with a run time of 0. Two outcomes follow, and this rule cannot tell
which one applies at the construction site:
- Harmless: the empty group is nested inside a non-empty group, or is a
placeholder that a later branch replaces. It contributes nothing and the
render succeeds.
AnimationGroup()is a common idiom for "no animation here". - Fatal: the empty group reaches
Scene.playas the whole animation.Scene.validate_run_timerejects a duration of 0 withValueErrorand the render aborts.
The finding is therefore a warning at high confidence rather than a certain
error. Narrowing it to the provable case — tracking whether the constructed
group is played directly — is open work.
- Default severity:
warning - Minimum confidence:
high - Implementation phase:
1 - Fix: none
Calls with a *args splat are skipped because the splat may supply
animations at runtime.