mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Add type hints for affects_mobject_list
This commit is contained in:
parent
7edc4b64ad
commit
ffbe5c8114
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue