Skip to content

Commit 4e49e91

Browse files
committed
bring _typecheck_input() to Write directly and add comment
1 parent d037b0a commit 4e49e91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

manim/animation/creation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ def __init__(
344344
reverse: bool = False,
345345
**kwargs,
346346
) -> None:
347+
self._typecheck_input(vmobject)
347348
run_time: float | None = kwargs.pop("run_time", None)
348349
lag_ratio: float | None = kwargs.pop("lag_ratio", None)
349350
run_time, lag_ratio = self._set_default_config_from_length(
@@ -387,6 +388,7 @@ def _adjust_stroke_width_for_text(
387388
if stroke_width is not None:
388389
return stroke_width
389390
if vmobject.height != 0:
391+
# if the height is zero, accessing font_size causes ZeroDivisionError
390392
font_size = getattr(vmobject, "font_size", DEFAULT_FONT_SIZE)
391393
if font_size < 20 or font_size > 6 * DEFAULT_FONT_SIZE:
392394
# Assuming the user is using MovingCameraScene and performing a zoom-in or zoom-out

0 commit comments

Comments
 (0)