Skip to content

Commit

Permalink
Use cls instead of Self
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Jan 1, 2024
1 parent b0f5847 commit 0aa472d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manim/animation/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


from copy import deepcopy
from typing import TYPE_CHECKING, Callable, Iterable, Self, Sequence, cast
from typing import TYPE_CHECKING, Callable, Iterable, Sequence, cast

if TYPE_CHECKING:
from manim.scene.scene import Scene
Expand Down Expand Up @@ -112,7 +112,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 All @@ -122,7 +122,7 @@ def __new__(
f"{type(mobject).__name__} mobjects. use_override = False can "
f" be used as keyword argument to prevent animation overriding.",
)
return cast(Self, anim)
return cast(cls, anim)
return super().__new__(cls)

def __init__(
Expand Down

0 comments on commit 0aa472d

Please sign in to comment.