Skip to content

Commit

Permalink
fixed up typing
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Sep 16, 2024
1 parent 64ba1d0 commit b0ad847
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@
if os.getenv("_PYTEST_RAISE", "0") != "0":

@pytest.hookimpl(tryfirst=True)
def pytest_exception_interact(call: ty.Any) -> None:
raise call.excinfo.value
def pytest_exception_interact(call: pytest.CallInfo[ty.Any]) -> None:
if call.excinfo is not None:
raise call.excinfo.value

@pytest.hookimpl(tryfirst=True)
def pytest_internalerror(excinfo: ty.Any) -> None:
def pytest_internalerror(excinfo: pytest.ExceptionInfo[BaseException]) -> None:
raise excinfo.value


Expand Down
2 changes: 2 additions & 0 deletions extras/fileformats/extras/image/readwrite.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import imageio
import numpy # noqa: F401
import typing # noqa: F401
from fileformats.core import extra_implementation
from fileformats.image.raster import RasterImage, DataArrayType

Expand Down
2 changes: 1 addition & 1 deletion fileformats/image/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import numpy.typing # noqa: F401

Check warning on line 9 in fileformats/image/raster.py

View check run for this annotation

Codecov / codecov/patch

fileformats/image/raster.py#L9

Added line #L9 was not covered by tests


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


class RasterImage(Image):
Expand Down

0 comments on commit b0ad847

Please sign in to comment.