Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Replace the TypeError message code in the _typecheck_input method in … (#3890)

Irvanal Haq17e5a77b0943
diff --git a/manim/animation/creation.py b/manim/animation/creation.py
index 124d3295f..f6b193b1a 100644
--- a/manim/animation/creation.py
+++ b/manim/animation/creation.py
@@ -250,7 +250,9 @@ class DrawBorderThenFill(Animation):
def _typecheck_input(self, vmobject: VMobject | OpenGLVMobject) -> None:
if not isinstance(vmobject, (VMobject, OpenGLVMobject)):
- raise TypeError("DrawBorderThenFill only works for vectorized Mobjects")
+ raise TypeError(
+ f"{self.__class__.__name__} only works for vectorized Mobjects"
+ )
def begin(self) -> None:
self.outline = self.get_outline()