Skip to content

Commit

Permalink
test TypeAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
bkmartinjr committed Aug 25, 2024
1 parent 0e32457 commit 5dc6cfd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions other_packages/python/tiledbsoma_ml/src/tiledbsoma_ml/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from itertools import islice
from math import ceil
from typing import (

Check warning on line 17 in other_packages/python/tiledbsoma_ml/src/tiledbsoma_ml/pytorch.py

View check run for this annotation

Codecov / codecov/patch

other_packages/python/tiledbsoma_ml/src/tiledbsoma_ml/pytorch.py#L8-L17

Added lines #L8 - L17 were not covered by tests
TYPE_CHECKING,
Any,
Dict,
Iterable,
Expand Down Expand Up @@ -46,10 +45,11 @@
_T = TypeVar("_T")
_T_co = TypeVar("_T_co", covariant=True)

Check warning on line 46 in other_packages/python/tiledbsoma_ml/src/tiledbsoma_ml/pytorch.py

View check run for this annotation

Codecov / codecov/patch

other_packages/python/tiledbsoma_ml/src/tiledbsoma_ml/pytorch.py#L45-L46

Added lines #L45 - L46 were not covered by tests

if TYPE_CHECKING:
NDArrayNumber: TypeAlias = npt.NDArray[np.number[Any]]
else:
NDArrayNumber: TypeAlias = np.ndarray
# if TYPE_CHECKING:
# NDArrayNumber: TypeAlias = npt.NDArray[np.number[Any]]
# else:
# NDArrayNumber: TypeAlias = np.ndarray
NDArrayNumber: TypeAlias = npt.NDArray[np.number[Any]]
XObsDatum: TypeAlias = Tuple[NDArrayNumber, pd.DataFrame]
XObsNpDatum: TypeAlias = Tuple[NDArrayNumber, NDArrayNumber]
XObsTensorDatum: TypeAlias = Tuple[torch.Tensor, torch.Tensor]
Expand Down

0 comments on commit 5dc6cfd

Please sign in to comment.