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 d4ff6cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manim/animation/animation.py
Original file line number Diff line number Diff line change
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 d4ff6cf

Please sign in to comment.