Skip to content

Commit

Permalink
fixing up typing of data array types
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Sep 16, 2024
1 parent 3b4957d commit c76f8b9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions fileformats/image/raster.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
from fileformats.core.typing import TypeAlias
import typing # noqa: F401
import typing as ty
from fileformats.core.mixin import WithMagicNumber
from fileformats.core.exceptions import FormatMismatchError
from .base import Image

# if ty.TYPE_CHECKING:
# import numpy.typing
# import numpy as np
if ty.TYPE_CHECKING:
import numpy.typing # noqa: F401


DataArrayType: TypeAlias = (
ty.Any
) # "numpy.typing.NDArray[ty.Union[np.floating, np.integer]]"
DataArrayType: TypeAlias = "numpy.typing.NDArray[ty.Union[numpy.floating[typing.Any], numpy.integer[typing.Any]]]"


class RasterImage(Image):
Expand Down

0 comments on commit c76f8b9

Please sign in to comment.