Skip to content

Commit c68396a

Browse files
committed
Comments for this commit:
- Removed unused `final_alpha_value` from `kwargs` in transform_matching_parts.py - Removed `angle` from Rotating example - Added type hint to `use_override` - Added `_original__init__` in Animation to support `.set_default()` behavior
1 parent 173041a commit c68396a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

manim/animation/animation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def __init__(
141141
introducer: bool = False,
142142
*,
143143
_on_finish: Callable[[], None] = lambda _: None,
144-
use_override=True, # included here to avoid TypeError if passed from a subclass's constructor
144+
use_override: bool = True, # included here to avoid TypeError if passed from a subclass's constructor
145145
) -> None:
146146
self._typecheck_input(mobject)
147147
self.run_time: float = run_time
@@ -497,6 +497,8 @@ def __init_subclass__(cls, **kwargs) -> None:
497497

498498
cls._original__init__ = cls.__init__
499499

500+
_original__init__ = __init__ # needed if set_default() is called with no kwargs directly from Animation
501+
500502
@classmethod
501503
def set_default(cls, **kwargs) -> None:
502504
"""Sets the default values of keyword arguments.

manim/animation/transform_matching_parts.py

-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def __init__(
9696
# target_map
9797
transform_source = group_type()
9898
transform_target = group_type()
99-
kwargs["final_alpha_value"] = 0
10099
for key in set(source_map).intersection(target_map):
101100
transform_source.add(source_map[key])
102101
transform_target.add(target_map[key])

manim/mobject/mobject.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def dot_position(mobject):
10111011
label.add_updater(dot_position)
10121012
self.add(dot, label)
10131013
1014-
self.play(Rotating(dot, about_point=ORIGIN, angle=TAU, run_time=TAU, rate_func=linear))
1014+
self.play(Rotating(dot, about_point=ORIGIN, run_time=TAU, rate_func=linear))
10151015
10161016
.. manim:: DtUpdater
10171017

0 commit comments

Comments
 (0)