Skip to content

Commit

Permalink
revert to absence of quotes in annotations, taking PR review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Mar 8, 2024
1 parent a8a053e commit 27e7a90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/plugins/building_a_plugin/_layer_data_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ LayerData = Union[Tuple[DataType], Tuple[DataType, LayerProps], FullLayerData]
where ...

```python
from typing import Dict, Literal, Protocol, Sequence, Tuple, Union
from typing import Literal, Protocol, Sequence
import numpy as np

LayerTypeName = Literal[
"image", "labels", "points", "shapes", "surface", "tracks", "vectors"
]
LayerProps = Dict
DataType = Union["ArrayLike", Sequence["ArrayLike"]]
DataType = Union[ArrayLike, Sequence[ArrayLike]]
FullLayerData = Tuple[DataType, LayerProps, LayerTypeName]
LayerData = Union[Tuple[DataType], Tuple[DataType, LayerProps], FullLayerData]

Expand All @@ -57,7 +57,7 @@ class ArrayLike(Protocol):
ndim: int
dtype: np.dtype
def __array__(self) -> np.ndarray: ...
def __getitem__(self, key) -> "ArrayLike": ...
def __getitem__(self, key) -> ArrayLike: ...

# the main point is that we're more concerned with structural
# typing than literal array types (e.g. numpy, dask, xarray, etc...)
Expand Down

0 comments on commit 27e7a90

Please sign in to comment.