Skip to content

Commit 410e76f

Browse files
Add __class_getitem__ to Mobject
1 parent 31f1895 commit 410e76f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

manim/mobject/mobject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,6 +2979,8 @@ def set_z_index_by_z_Point3D(self) -> Self:
29792979
self.set_z_index(z_coord)
29802980
return self
29812981

2982+
def __class_getitem__(cls, item: type) -> str:
2983+
return f"{cls.__name__}[{item.__name__}]"
29822984

29832985
class Group(Mobject, metaclass=ConvertToOpenGL):
29842986
"""Groups together multiple :class:`Mobjects <.Mobject>`.

0 commit comments

Comments
 (0)