Skip to content

MLC127: duplicate child in a single add() / VGroup() / Group() call

qual reports MLC127 when the same name appears twice among the positional arguments of one Mobject.add(...), VGroup(...), or Group(...) call. Manim ignores repeated children of a single add and only emits a runtime warning, so the duplicate argument has no effect and usually signals a typo (DESIGN §3.4).

  • Default severity: info
  • Minimum confidence: certain
  • Implementation phase: 1
  • Fix: removing the duplicate argument is SAFE (the edit deletes the argument together with its separating comma and is verified to re-parse)

Only plain identical identifiers fire; distinct expressions that may alias the same object are Phase 2 territory.

Wrong

class Demo(Scene):
    def construct(self):
        square = Square()
        dot = Dot()
        group = VGroup(square, dot, square)
class Demo(Scene):
    def construct(self):
        square = Square()
        dot = Dot()
        group = VGroup(square, dot)