diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e77c6ee2..b396a4cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,25 +15,25 @@ repos: - id: check-added-large-files - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.25 + rev: '0.26' hooks: - id: validate-pyproject - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.48.0 + rev: v1.50.1 hooks: - id: typos args: [--force-exclude] # omitting --write-changes - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.1 + rev: v0.16.6 hooks: - id: ruff-check args: [--fix, --unsafe-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v2.3.0 + rev: v2.3.1 hooks: - id: mypy files: "^src/" diff --git a/docs/cookbook/embedding.md b/docs/cookbook/embedding.md index 40d7214c..4e2e18d2 100644 --- a/docs/cookbook/embedding.md +++ b/docs/cookbook/embedding.md @@ -14,7 +14,7 @@ The following script shows an example on how to dynamically select a data set and load it in the `ArrayViewer`. ````python title="examples/cookbook/ndv_embedded.py" ---8<-- "examples/cookbook/ndv_embedded.py" +--8 < --"examples/cookbook/ndv_embedded.py" ```` {{ screenshot: examples/cookbook/ndv_embedded.py }} @@ -26,7 +26,7 @@ The following script shows an example on how to create multiple instances of the each one. ````python title="examples/cookbook/multi_ndv.py" ---8<-- "examples/cookbook/multi_ndv.py" +--8 < --"examples/cookbook/multi_ndv.py" ```` {{ screenshot: examples/cookbook/multi_ndv.py }} diff --git a/docs/cookbook/streaming.md b/docs/cookbook/streaming.md index 7d7b279a..8cc0902f 100644 --- a/docs/cookbook/streaming.md +++ b/docs/cookbook/streaming.md @@ -13,7 +13,7 @@ update the buffer in place with the new data. Calling `update()` on the will force the display to fetch your new data: ````python title="examples/streaming.py" ---8<-- "examples/streaming.py" +--8 < --"examples/streaming.py" ```` ## Streaming, remembering the last N frames @@ -24,5 +24,5 @@ you can use the [`ndv.models.RingBuffer`][] class. It offers a convenient shape of the data (as far as the viewer is concerned): ````python title="examples/streaming_with_history.py" ---8<-- "examples/streaming_with_history.py" +--8 < --"examples/streaming_with_history.py" ```` diff --git a/docs/usage.md b/docs/usage.md index d46d00d6..9e56c71e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -273,6 +273,7 @@ subclassing [`DataWrapper`][ndv.DataWrapper]: ```python import ndv + class MyWrapper(ndv.DataWrapper): @classmethod def supports(cls, data):