Skip to content

MLC103: bound mobject method passed to Scene.play (pre-0.6 API)

qual reports MLC103 when an uncalled bound mobject method is passed to a confirmed Scene.play call, as in play(mob.shift, RIGHT). This was the animation API before Manim Community 0.6; Manim 0.20 only accepts Animation instances and .animate builders, so the call raises TypeError.

  • Default severity: error
  • Minimum confidence: certain
  • Implementation phase: 1
  • Fix: none (the mapping to .animate depends on the trailing arguments)

The rule fires only when the attribute's receiver is a known mobject instance and every candidate resolves to the same curated mobject method. Trailing positional arguments (like RIGHT) corroborate the pattern but are not required.

Wrong

class Demo(Scene):
    def construct(self):
        square = Square()
        self.play(square.shift, RIGHT)
class Demo(Scene):
    def construct(self):
        square = Square()
        self.play(square.animate.shift(RIGHT))