@@ -33,14 +33,17 @@ def construct(self):
3333
3434import typing
3535
36- import numpy as np
37-
3836from ..animation .transform import Transform
3937from ..constants import PI
4038from ..utils .paths import spiral_path
4139
4240if typing .TYPE_CHECKING :
41+ from typing import Any
42+
4343 from manim .mobject .geometry .line import Arrow
44+ from manim .mobject .opengl .opengl_mobject import OpenGLMobject
45+ from manim .typing import Point3DLike , Vector3DLike
46+ from manim .utils .color import ParsableManimColor
4447
4548 from ..mobject .mobject import Mobject
4649
@@ -76,16 +79,20 @@ def construct(self):
7679 """
7780
7881 def __init__ (
79- self , mobject : Mobject , point : np .ndarray , point_color : str = None , ** kwargs
80- ) -> None :
82+ self ,
83+ mobject : Mobject ,
84+ point : Point3DLike ,
85+ point_color : ParsableManimColor | None = None ,
86+ ** kwargs : Any ,
87+ ):
8188 self .point = point
8289 self .point_color = point_color
8390 super ().__init__ (mobject , introducer = True , ** kwargs )
8491
85- def create_target (self ) -> Mobject :
92+ def create_target (self ) -> Mobject | OpenGLMobject :
8693 return self .mobject
8794
88- def create_starting_mobject (self ) -> Mobject :
95+ def create_starting_mobject (self ) -> Mobject | OpenGLMobject :
8996 start = super ().create_starting_mobject ()
9097 start .scale (0 )
9198 start .move_to (self .point )
@@ -118,7 +125,12 @@ def construct(self):
118125
119126 """
120127
121- def __init__ (self , mobject : Mobject , point_color : str = None , ** kwargs ) -> None :
128+ def __init__ (
129+ self ,
130+ mobject : Mobject ,
131+ point_color : ParsableManimColor | None = None ,
132+ ** kwargs : Any ,
133+ ):
122134 point = mobject .get_center ()
123135 super ().__init__ (mobject , point , point_color = point_color , ** kwargs )
124136
@@ -153,8 +165,12 @@ def construct(self):
153165 """
154166
155167 def __init__ (
156- self , mobject : Mobject , edge : np .ndarray , point_color : str = None , ** kwargs
157- ) -> None :
168+ self ,
169+ mobject : Mobject ,
170+ edge : Vector3DLike ,
171+ point_color : ParsableManimColor | None = None ,
172+ ** kwargs : Any ,
173+ ):
158174 point = mobject .get_critical_point (edge )
159175 super ().__init__ (mobject , point , point_color = point_color , ** kwargs )
160176
@@ -183,11 +199,13 @@ def construct(self):
183199
184200 """
185201
186- def __init__ (self , arrow : Arrow , point_color : str = None , ** kwargs ) -> None :
202+ def __init__ (
203+ self , arrow : Arrow , point_color : ParsableManimColor | None = None , ** kwargs : Any
204+ ):
187205 point = arrow .get_start ()
188206 super ().__init__ (arrow , point , point_color = point_color , ** kwargs )
189207
190- def create_starting_mobject (self ) -> Mobject :
208+ def create_starting_mobject (self ) -> Mobject | OpenGLMobject :
191209 start_arrow = self .mobject .copy ()
192210 start_arrow .scale (0 , scale_tips = True , about_point = self .point )
193211 if self .point_color :
@@ -224,8 +242,12 @@ def construct(self):
224242 """
225243
226244 def __init__ (
227- self , mobject : Mobject , angle : float = PI / 2 , point_color : str = None , ** kwargs
228- ) -> None :
245+ self ,
246+ mobject : Mobject ,
247+ angle : float = PI / 2 ,
248+ point_color : ParsableManimColor | None = None ,
249+ ** kwargs : Any ,
250+ ):
229251 self .angle = angle
230252 super ().__init__ (
231253 mobject , path_func = spiral_path (angle ), point_color = point_color , ** kwargs
0 commit comments