Skip to content

Commit

Permalink
Add type hints for affects_mobject_list
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Mar 2, 2024
1 parent 7edc4b6 commit ffbe5c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions manimlib/scene/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Callable, Iterable
from typing import Callable, Iterable, TypeVar
from manimlib.typing import Vect3

T = TypeVar('T')

from PIL.Image import Image

from manimlib.animation.animation import Animation
Expand Down Expand Up @@ -399,7 +401,8 @@ def assemble_render_groups(self):
for batch, key in batches
]

def affects_mobject_list(func: Callable):
@staticmethod
def affects_mobject_list(func: Callable[..., T]) -> Callable[..., T]:
@wraps(func)
def wrapper(self, *args, **kwargs):
func(self, *args, **kwargs)
Expand Down

0 comments on commit ffbe5c8

Please sign in to comment.