mirror of
https://github.com/3b1b/manim.git
synced 2025-08-21 05:44:04 +00:00
Use Iterator type for Mobject.__iter__
This commit is contained in:
parent
4c327cd5d2
commit
1e46847a69
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ from manimlib.utils.space_ops import rotation_matrix_transpose
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import Callable, Iterable, Union, Tuple, Optional, Self
|
from typing import Callable, Iterable, Iterator, Union, Tuple, Optional, Self
|
||||||
import numpy.typing as npt
|
import numpy.typing as npt
|
||||||
from manimlib.typing import ManimColor, Vect3, Vect4, Vect3Array, UniformDict
|
from manimlib.typing import ManimColor, Vect3, Vect4, Vect3Array, UniformDict
|
||||||
from moderngl.context import Context
|
from moderngl.context import Context
|
||||||
|
@ -350,7 +350,7 @@ class Mobject(object):
|
||||||
return GroupClass(*self.split().__getitem__(value))
|
return GroupClass(*self.split().__getitem__(value))
|
||||||
return self.split().__getitem__(value)
|
return self.split().__getitem__(value)
|
||||||
|
|
||||||
def __iter__(self) -> Iterable[Self]:
|
def __iter__(self) -> Iterator[Self]:
|
||||||
return iter(self.split())
|
return iter(self.split())
|
||||||
|
|
||||||
def __len__(self) -> int:
|
def __len__(self) -> int:
|
||||||
|
|
Loading…
Add table
Reference in a new issue