mirror of
https://github.com/3b1b/manim.git
synced 2025-08-21 05:44:04 +00:00
Move RangeSpecifier to constants
This commit is contained in:
parent
a05820b7c7
commit
02143001a4
2 changed files with 3 additions and 4 deletions
|
@ -5,13 +5,14 @@ import numpy as np
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import Union
|
from typing import Union, Tuple
|
||||||
from colour import Color
|
from colour import Color
|
||||||
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
# Abbreviations for a common types
|
# Abbreviations for a common types
|
||||||
ManimColor = Union[str, Color, None]
|
ManimColor = Union[str, Color, None]
|
||||||
|
RangeSpecifier = Tuple[float, float, float] | Tuple[float, float]
|
||||||
np_vector = np.ndarray[int, np.dtype[np.float64]]
|
np_vector = np.ndarray[int, np.dtype[np.float64]]
|
||||||
|
|
||||||
# Sizes relevant to default camera frame
|
# Sizes relevant to default camera frame
|
||||||
|
|
|
@ -35,9 +35,7 @@ from typing import TYPE_CHECKING
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import Callable, Iterable, Sequence, Type, TypeVar, Tuple
|
from typing import Callable, Iterable, Sequence, Type, TypeVar, Tuple
|
||||||
from manimlib.mobject.mobject import Mobject
|
from manimlib.mobject.mobject import Mobject
|
||||||
from manimlib.constants import ManimColor, np_vector
|
from manimlib.constants import ManimColor, np_vector, RangeSpecifier
|
||||||
|
|
||||||
RangeSpecifier = Tuple[float, float, float] | Tuple[float, float]
|
|
||||||
|
|
||||||
T = TypeVar("T", bound=Mobject)
|
T = TypeVar("T", bound=Mobject)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue