Add type hints for affects_mobject_list

This commit is contained in:
Grant Sanderson
2024-03-02 16:49:35 -05:00
parent 7edc4b64ad
commit ffbe5c8114

View File

@ -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)