Skip to content

Commit

Permalink
Change type hint on LaggedStart to accept any functions outputting an…
Browse files Browse the repository at this point in the history
…imations
  • Loading branch information
3b1b committed Feb 5, 2023
1 parent 7d1330f commit 4e90a77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manimlib/animation/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def __init__(
class LaggedStartMap(LaggedStart):
def __init__(
self,
AnimationClass: type,
anim_func: Callable[[Mobject], Animation],
group: Mobject,
arg_creator: Callable[[Mobject], tuple] | None = None,
run_time: float = 2.0,
Expand All @@ -175,7 +175,7 @@ def __init__(
anim_kwargs = dict(kwargs)
anim_kwargs.pop("lag_ratio", None)
super().__init__(
*(AnimationClass(submob, **anim_kwargs) for submob in group),
*(anim_func(submob, **anim_kwargs) for submob in group),
run_time=run_time,
lag_ratio=lag_ratio,
)

0 comments on commit 4e90a77

Please sign in to comment.