From 7ac78f3dbb1248291b6edee5f0de57748cb6f190 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Sat, 17 Dec 2022 22:14:53 -0800 Subject: [PATCH] Updating type hints for paths.py --- manimlib/utils/paths.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/manimlib/utils/paths.py b/manimlib/utils/paths.py index 67192e45..37473797 100644 --- a/manimlib/utils/paths.py +++ b/manimlib/utils/paths.py @@ -13,6 +13,7 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Callable + from manimlib.typing import Vect3, Vect3Array STRAIGHT_PATH_THRESHOLD = 0.01 @@ -34,8 +35,8 @@ def straight_path( def path_along_arc( arc_angle: float, - axis: np.ndarray = OUT -) -> Callable[[np.ndarray, np.ndarray, float], np.ndarray]: + axis: Vect3 = OUT +) -> Callable[[Vect3Array, Vect3Array, float], Vect3Array]: """ If vect is vector from start to end, [vect[:,1], -vect[:,0]] is perpendicular to vect in the left direction. @@ -57,9 +58,9 @@ def path_along_arc( return path -def clockwise_path() -> Callable[[np.ndarray, np.ndarray, float], np.ndarray]: +def clockwise_path() -> Callable[[Vect3Array, Vect3Array, float], Vect3Array]: return path_along_arc(-np.pi) -def counterclockwise_path() -> Callable[[np.ndarray, np.ndarray, float], np.ndarray]: +def counterclockwise_path() -> Callable[[Vect3Array, Vect3Array, float], Vect3Array]: return path_along_arc(np.pi)