Skip to content

Commit

Permalink
move new text up in section per https://github.com/napari/docs/pull/3…
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Mar 7, 2024
1 parent 5ce242d commit 52c465a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/plugins/building_a_plugin/_layer_data_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ directly. Instead, it passes (mostly) pure-python and array-like types,
deconstructed into a {class}`tuple` that we refer to as a `LayerData` tuple. This type shows
up often in plugins and is explained here.

Note that when writing your own plugin, type annotations are nearly always optional,
except in rare cases like [`magicgui` function widgets](magicgui).
Here in this section, in some examples we provide these annotations with names which indicate
their role in a plugin, and the level of generality that's possible (e.g., with `ArrayLike`).

### Informal description

```py
Expand Down Expand Up @@ -56,11 +61,6 @@ class ArrayLike(Protocol):
# typing than literal array types (e.g. numpy, dask, xarray, etc...)
```

Note that when writing your own plugin, such type annotations are nearly always optional,
except in rare cases like `magicgui` function widgets.
Here, for clarity, we've provided type names which indicate how values of the type are
being used and the level of generality that's possible (e.g., with `ArrayLike`).

### Examples

Assume that `data` is a numpy array:
Expand Down

0 comments on commit 52c465a

Please sign in to comment.