mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 14:03:59 +08:00
Add type hints for affects_mobject_list
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user