From a65aa41a1b2da95fe1c2c749bae9a7f2f1d83064 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 03:24:18 +0000 Subject: [PATCH 1/3] test: bump the pre-commit group with 4 updates Bumps the pre-commit group with 4 updates: [https://github.com/biomejs/pre-commit](https://github.com/biomejs/pre-commit), [https://github.com/tox-dev/pyproject-fmt](https://github.com/tox-dev/pyproject-fmt), [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) and [https://github.com/zizmorcore/zizmor-pre-commit](https://github.com/zizmorcore/zizmor-pre-commit). Updates `https://github.com/biomejs/pre-commit` from v2.5.10 to 2.5.11 - [Release notes](https://github.com/biomejs/pre-commit/releases) - [Commits](https://github.com/biomejs/pre-commit/compare/v2.5.10...v2.5.11) Updates `https://github.com/tox-dev/pyproject-fmt` from v2.28.1 to 2.29.3 - [Release notes](https://github.com/tox-dev/pyproject-fmt/releases) - [Commits](https://github.com/tox-dev/pyproject-fmt/compare/v2.28.1...v2.29.3) Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.16.4 to 0.16.5 - [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases) - [Commits](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.4...v0.16.5) Updates `https://github.com/zizmorcore/zizmor-pre-commit` from v1.29.0 to 1.30.0 - [Release notes](https://github.com/zizmorcore/zizmor-pre-commit/releases) - [Commits](https://github.com/zizmorcore/zizmor-pre-commit/compare/v1.29.0...v1.30.0) --- updated-dependencies: - dependency-name: https://github.com/biomejs/pre-commit dependency-version: 2.5.11 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/tox-dev/pyproject-fmt dependency-version: 2.29.3 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/astral-sh/ruff-pre-commit dependency-version: 0.16.5 dependency-type: direct:production dependency-group: pre-commit - dependency-name: https://github.com/zizmorcore/zizmor-pre-commit dependency-version: 1.30.0 dependency-type: direct:production dependency-group: pre-commit ... Signed-off-by: dependabot[bot] --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a15929b99b..2985e3b156 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,18 +8,18 @@ repos: - --drop=abstract groups: [format] - repo: https://github.com/biomejs/pre-commit - rev: v2.5.10 + rev: v2.5.11 hooks: - id: biome-format groups: [format] exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually. - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.28.1 + rev: v2.29.3 hooks: - id: pyproject-fmt groups: [format] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.4 + rev: v0.16.5 hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] @@ -49,7 +49,7 @@ repos: - id: no-commit-to-branch args: [--branch=main] - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.29.0 + rev: v1.30.0 hooks: - id: zizmor args: [--no-progress, --fix] From 41eddd32c5a10c23df7b1bc6e8bfc5391abebe9f Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 03:24:47 +0000 Subject: [PATCH 2/3] [autofix.ci] apply automated fixes --- docs/usage-principles.md | 7 +++++-- pyproject.toml | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/usage-principles.md b/docs/usage-principles.md index d3c4dff647..e34bd706c5 100644 --- a/docs/usage-principles.md +++ b/docs/usage-principles.md @@ -56,9 +56,12 @@ to initialize an {class}`~anndata.AnnData` object. Possibly add further annotati ```python import pandas as pd + anno = pd.read_csv(filename_sample_annotation) -adata.obs['cell_groups'] = anno['cell_groups'] # categorical annotation of type pandas.Categorical -adata.obs['time'] = anno['time'] # numerical annotation of type float +adata.obs["cell_groups"] = anno[ + "cell_groups" +] # categorical annotation of type pandas.Categorical +adata.obs["time"] = anno["time"] # numerical annotation of type float # alternatively, you could also set the whole dataframe # adata.obs = anno ``` diff --git a/pyproject.toml b/pyproject.toml index 3183521eac..c5e98b8ac1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -226,10 +226,18 @@ lint.pylint.max-positional-args = 5 "pandas.api.types.is_categorical_dtype".msg = "Use isinstance(s.dtype, CategoricalDtype) instead" "pandas.value_counts".msg = "Use pd.Series(a).value_counts() instead" "pytest.importorskip".msg = "Use the “@needs” decorator/mark instead" -"scipy.sparse.csc_array".msg = "Use _compat.CSCBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing" -"scipy.sparse.csc_matrix".msg = "Use _compat.CSCBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing" -"scipy.sparse.csr_array".msg = "Use _compat.CSRBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing" -"scipy.sparse.csr_matrix".msg = "Use _compat.CSRBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing" +"scipy.sparse.csc_array".msg = """\ + Use _compat.CSCBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing\ + """ +"scipy.sparse.csc_matrix".msg = """\ + Use _compat.CSCBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing\ + """ +"scipy.sparse.csr_array".msg = """\ + Use _compat.CSRBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing\ + """ +"scipy.sparse.csr_matrix".msg = """\ + Use _compat.CSRBase or _compat.CSBase for typing/type checks and add `# noqa: TID251` when constructing\ + """ "scipy.sparse.issparse".msg = "Use isinstance(_, _compat.CSBase) or isinstance(_, _compat.SpBase) instead" "scipy.sparse.sparray".msg = "Use _compat.SpBase instead" "scipy.sparse.spmatrix".msg = "Use _compat.SpBase instead" From 8cbf67050d2688d1e411d10de63a090fd0fa3c4d Mon Sep 17 00:00:00 2001 From: "Philipp A." Date: Thu, 10 Sep 2026 09:37:31 +0200 Subject: [PATCH 3/3] fmt Simplified assignment of annotations to adata.obs. --- docs/usage-principles.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/usage-principles.md b/docs/usage-principles.md index e34bd706c5..457824dc8a 100644 --- a/docs/usage-principles.md +++ b/docs/usage-principles.md @@ -58,10 +58,8 @@ to initialize an {class}`~anndata.AnnData` object. Possibly add further annotati import pandas as pd anno = pd.read_csv(filename_sample_annotation) -adata.obs["cell_groups"] = anno[ - "cell_groups" -] # categorical annotation of type pandas.Categorical -adata.obs["time"] = anno["time"] # numerical annotation of type float +# annotations of types pandas.Categorical and float +adata.obs[["cell_groups", "time"]] = anno[["cell_groups", "time"]] # alternatively, you could also set the whole dataframe # adata.obs = anno ```