Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: trailing-whitespace
- id: no-commit-to-branch
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.5
rev: v0.14.8
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -18,15 +18,15 @@ repos:
hooks:
- id: pyproject-fmt
- repo: https://github.com/biomejs/pre-commit
rev: v2.3.5
rev: v2.3.8
hooks:
- id: biome-format
- repo: https://github.com/H4rryK4ne/update-mypy-hook
rev: a8b56c4055ff0c7c589794c02813ef8e9d5704fc
rev: v0.3.0
hooks:
- id: update-mypy-hook
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
rev: v1.19.0
hooks:
- id: mypy
args: [--config-file=pyproject.toml, .]
Expand All @@ -43,12 +43,12 @@ repos:
- click==8.3.1
- cloudpickle==3.1.2
- colorama==0.4.6 ; sys_platform == 'win32'
- coverage==7.12.0
- coverage==7.13.0
- dask==2025.11.0
- docutils==0.22.3
- donfig==0.8.1.post1
- execnet==2.1.2
- fsspec==2025.10.0
- fsspec==2025.12.0
- google-crc32c==1.7.1
- h5py==3.15.1
- idna==3.11
Expand All @@ -57,24 +57,24 @@ repos:
- jinja2==3.1.6
- joblib==1.5.2
- legacy-api-wrap==1.5
- llvmlite==0.45.1
- llvmlite==0.46.0
- locket==1.0.0
- markdown-it-py==4.0.0
- markupsafe==3.0.3
- mdurl==0.1.2
- natsort==8.4.0
- numba==0.62.1
- numba==0.63.1
- numcodecs==0.16.5
- numpy==2.3.5
- numpy-typing-compat==20250818.2.3
- optype==0.14.0
- numpy-typing-compat==20251206.2.3
- optype==0.15.0
- packaging==25.0
- pandas==2.3.3
- partd==1.4.2
- pluggy==1.6.0
- pycparser==2.23 ; implementation_name != 'PyPy'
- pygments==2.19.2
- pytest==9.0.1
- pytest==9.0.2
- pytest-codspeed==4.2.0
- pytest-doctestplus==1.6.0
- pytest-xdist==3.8.0
Expand All @@ -84,12 +84,12 @@ repos:
- requests==2.32.5
- rich==14.2.0
- roman-numerals==3.1.0
- scikit-learn==1.7.2
- scikit-learn==1.8.0
- scipy==1.16.3
- scipy-stubs==1.16.3.2
- scipy-stubs==1.16.3.3
- six==1.17.0
- snowballstemmer==3.0.1
- sphinx==9.0.1
- sphinx==9.0.4
- sphinxcontrib-applehelp==2.0.0
- sphinxcontrib-devhelp==2.0.0
- sphinxcontrib-htmlhelp==2.1.0
Expand All @@ -100,9 +100,10 @@ repos:
- toolz==1.1.0
- types-docutils==0.22.3.20251115
- tzdata==2025.2
- urllib3==2.5.0
- urllib3==2.6.1
- zarr==3.1.5
ci:
autoupdate_commit_msg: 'ci: pre-commit autoupdate'
skip:
- mypy # too big
- update-mypy-hook # offline?
9 changes: 4 additions & 5 deletions src/testing/fast_array_utils/_array_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,14 @@ def _to_dask_array(self, x: ArrayLike | Array, /, *, dtype: DTypeLike | None = N
import dask.array as da

assert self.inner is not None
if TYPE_CHECKING:
assert isinstance(self.inner, ArrayType[CpuArray | GpuArray, None]) # type: ignore[misc]
inner = cast("ArrayType[CpuArray | GpuArray, None]", self.inner)

if isinstance(x, types.DaskArray):
if isinstance(x._meta, self.inner.cls): # noqa: SLF001
if isinstance(x._meta, inner.cls): # noqa: SLF001
return x
return x.map_blocks(self.inner, dtype=dtype, meta=self.inner([[1]], dtype=dtype or x.dtype))
return x.map_blocks(inner, dtype=dtype, meta=inner([[1]], dtype=dtype or x.dtype))

arr = self.inner(x, dtype=dtype)
arr = inner(x, dtype=dtype)
return da.from_array(arr, _half_chunk_size(arr.shape))

def _to_h5py_dataset(self, x: ArrayLike | Array, /, *, dtype: DTypeLike | None = None) -> types.H5Dataset:
Expand Down
Loading