Skip to content

Commit 85ca787

Browse files
[pre-commit.ci] pre-commit autoupdate (#105)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Phil Schaf <flying-sheep@web.de>
1 parent 9ba493b commit 85ca787

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@ repos:
66
- id: trailing-whitespace
77
- id: no-commit-to-branch
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.11.13
9+
rev: v0.12.2
1010
hooks:
11-
- id: ruff
11+
- id: ruff-check
1212
args: [--fix, --exit-non-zero-on-fix]
13-
- id: ruff
13+
- id: ruff-check
1414
args: [--preview, --select=CPY]
1515
- id: ruff-format
1616
- repo: https://github.com/tox-dev/pyproject-fmt
1717
rev: v2.6.0
1818
hooks:
1919
- id: pyproject-fmt
2020
- repo: https://github.com/biomejs/pre-commit
21-
rev: v1.9.4
21+
rev: v2.1.1
2222
hooks:
2323
- id: biome-format
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.16.0
25+
rev: v1.16.1
2626
hooks:
2727
- id: mypy
2828
args: [--config-file=pyproject.toml]
2929
additional_dependencies:
3030
- pytest
31-
- pytest-codspeed
31+
- pytest-codspeed!=4.0.0 # https://github.com/CodSpeedHQ/pytest-codspeed/pull/84
3232
- numba
3333
- numpy
3434
- scipy-stubs

biome.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.1.1/schema.json",
33
"formatter": { "useEditorconfig": true },
44
"overrides": [
55
{
6-
"include": ["./.vscode/*.json", "**/*.jsonc"],
6+
"includes": ["./.vscode/*.json", "**/*.jsonc"],
77
"json": {
88
"formatter": {
99
"trailingCommas": "all",

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ lint.ignore = [
121121
"D213", # prefer docstring summary on first line
122122
"FIX002", # “TODO” comments
123123
"N812", # lowercase imports are fine
124+
"PLC0415", # we rely heavily on non-top-level imports
124125
"PLR0913", # having many (kw)args is fine
125126
"Q", # handled by formatter
126127
"S101", # asserts are fine

src/testing/fast_array_utils/_array_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def _to_cs_dataset(self, x: ArrayLike | Array, /, *, dtype: DTypeLike | None = N
294294
else:
295295
raise NotImplementedError
296296

297-
cls = csr_array if self.cls is types.CSRDataset else csc_array
297+
cls = cast("type[types.csr_array[Any, tuple[int, int]] | types.csc_array]", csr_array if self.cls is types.CSRDataset else csc_array)
298298
x_sparse = self._to_scipy_sparse(x, dtype=dtype, cls=cls)
299299
anndata.io.write_elem(grp, "/", x_sparse)
300300
return anndata.io.sparse_dataset(grp)

tests/test_stats.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_ndim_error(array_type: ArrayType[Array], func: StatFun, ndim: Literal[1
121121

122122
@pytest.mark.array_type(skip=ATS_SPARSE_DS)
123123
def test_sum(
124-
array_type: ArrayType[Array],
124+
array_type: ArrayType[CpuArray | GpuArray | DiskArray | types.DaskArray],
125125
dtype_in: type[DTypeIn],
126126
dtype_arg: type[DTypeOut] | None,
127127
axis: Literal[0, 1, None],
@@ -261,6 +261,7 @@ def test_mean_var_sparse_32(array_type: ArrayType[types.CSArray]) -> None:
261261
],
262262
)
263263
def test_is_constant(
264+
*,
264265
array_type: ArrayType[CpuArray | types.DaskArray],
265266
axis: Literal[0, 1, None],
266267
expected: bool | list[bool],

0 commit comments

Comments
 (0)