MLC124: .animate chains a method that does not mutate the target¶
qual reports MLC124 when a .animate chain calls a method the
knowledge profile curates as returns_self: false — a getter or copy such
as copy() or generate_target(). The chained call runs against the
generated target copy and only returns a value; the copy is unchanged, so
the built animation shows nothing.
- Default severity:
warning - Minimum confidence:
high - Implementation phase:
2 - Fix: none (a mutating method, or calling the getter outside
.animate, is suggested)
Only positively curated returns_self: false methods fire; uncurated
methods and targets with an unresolved class stay silent.
Wrong¶
class Demo(Scene):
def construct(self):
square = Square()
self.add(square)
self.play(square.animate.copy()) # copies the target, animates nothing