Skip to content

MLC101: Scene.play requires at least one animation

qual reports MLC101 when a call confirmed to target Scene.play passes zero positional arguments. Play keyword arguments such as run_time=... only configure animations that were passed, so a call with keywords but no positional animations still renders nothing and raises ValueError at render time.

  • Default severity: error
  • Minimum confidence: certain
  • Implementation phase: 1
  • Fix: none

The rule fires only when the receiver is confirmed (self.play(...) inside a discovered Scene subclass, or a candidate set resolving to manim.scene.scene.Scene.play). A *args splat may supply animations at runtime, so splatted calls are skipped.

Wrong

class Demo(Scene):
    def construct(self):
        self.play()
        self.play(run_time=2)
class Demo(Scene):
    def construct(self):
        square = Square()
        self.play(Create(square), run_time=2)