diff --git a/manimlib/scene/scene.py b/manimlib/scene/scene.py index cd95eef0..7dc4f2d6 100644 --- a/manimlib/scene/scene.py +++ b/manimlib/scene/scene.py @@ -44,9 +44,11 @@ from manimlib.utils.iterables import batch_by_property 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 @@ -399,7 +401,8 @@ class Scene(object): 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)