Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion manim/animation/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from copy import deepcopy
from typing import TYPE_CHECKING, Callable, Iterable, Sequence

from typing_extensions import Self

if TYPE_CHECKING:
from manim.scene.scene import Scene

Expand Down Expand Up @@ -112,7 +114,7 @@ def __new__(
*args,
use_override=True,
**kwargs,
):
) -> Self:
if isinstance(mobject, Mobject) and use_override:
func = mobject.animation_override_for(cls)
if func is not None:
Expand Down
4 changes: 3 additions & 1 deletion manim/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@
# Due to current limitations
# (see https://github.com/python/mypy/issues/14656 / 8263),
# we don't specify the first argument type (Mobject).
FunctionOverride: TypeAlias = Callable[..., None]
# Nor are we able to specify the return type (Animation) since we cannot import
# that here.
FunctionOverride: TypeAlias = Callable
"""Function type returning an :class:`~.Animation` for the specified
:class:`~.Mobject`.
"""
Expand Down