mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Move Selector and Span to manimlib.typing
This commit is contained in:
@ -1,14 +1,24 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Union, Tuple, Annotated, Literal
|
||||
from typing import Union, Tuple, Annotated, Literal, Iterable
|
||||
from colour import Color
|
||||
import numpy as np
|
||||
import re
|
||||
|
||||
# Abbreviations for a common types
|
||||
ManimColor = Union[str, Color, None]
|
||||
RangeSpecifier = Tuple[float, float, float] | Tuple[float, float]
|
||||
|
||||
|
||||
Span = tuple[int, int]
|
||||
SingleSelector = Union[
|
||||
str,
|
||||
re.Pattern,
|
||||
tuple[Union[int, None], Union[int, None]],
|
||||
]
|
||||
Selector = Union[SingleSelector, Iterable[SingleSelector]]
|
||||
|
||||
# These are various alternate names for np.ndarray meant to specify
|
||||
# certain shapes.
|
||||
#
|
||||
|
Reference in New Issue
Block a user