Skip to content

Commit

Permalink
Fix compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Sep 22, 2023
1 parent 8522b59 commit 6f95fd3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions manim/typing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from os import PathLike
from typing import Callable
from typing import Callable, Tuple, Union

import numpy as np
import numpy.typing as npt
Expand All @@ -14,16 +14,16 @@
ManimColorDType: TypeAlias = ManimFloat

RGB_Array_Float: TypeAlias = npt.NDArray[ManimFloat]
RGB_Tuple_Float: TypeAlias = tuple[float, float, float]
RGB_Tuple_Float: TypeAlias = Tuple[float, float, float]

RGB_Array_Int: TypeAlias = npt.NDArray[ManimInt]
RGB_Tuple_Int: TypeAlias = tuple[int, int, int]
RGB_Tuple_Int: TypeAlias = Tuple[int, int, int]

RGBA_Array_Float: TypeAlias = npt.NDArray[ManimFloat]
RGBA_Tuple_Float: TypeAlias = tuple[float, float, float, float]
RGBA_Tuple_Float: TypeAlias = Tuple[float, float, float, float]

RGBA_Array_Int: TypeAlias = npt.NDArray[ManimInt]
RGBA_Tuple_Int: TypeAlias = tuple[int, int, int, int]
RGBA_Tuple_Int: TypeAlias = Tuple[int, int, int, int]

HSV_Array_Float: TypeAlias = RGB_Array_Float
HSV_Tuple_Float: TypeAlias = RGB_Tuple_Float
Expand Down Expand Up @@ -110,5 +110,5 @@
Image: TypeAlias = np.ndarray
"""An Image"""

StrPath: TypeAlias = str | PathLike[str]
StrOrBytesPath: TypeAlias = str | bytes | PathLike[str] | PathLike[bytes]
StrPath: TypeAlias = Union[str, PathLike[str]]
StrOrBytesPath: TypeAlias = Union[str, bytes, PathLike[str], PathLike[bytes]]

0 comments on commit 6f95fd3

Please sign in to comment.