From c0bc58c033f418be9100daf7bf7ac8ae292ed5db Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 13 Jan 2025 20:01:28 +0000
Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.4 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.4...v0.9.1)
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)
---
.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 937fcfc..590e738 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,8 +2,8 @@ fail_fast: false
default_language_version:
python: python3
default_stages:
- - commit
- - push
+ - pre-commit
+ - pre-push
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
@@ -13,7 +13,7 @@ repos:
# doesn't work in combination with jupytext hook yet. See https://github.com/mwouts/jupytext/issues/580
exclude: "docs/notebooks/.*\\.md"
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.5.4
+ rev: v0.9.1
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
@@ -21,7 +21,7 @@ repos:
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.6.0
+ rev: v5.0.0
hooks:
- id: detect-private-key
- id: check-ast
From 99d9d9d49d0ece966ca5877f800be4f35ecf6ca7 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 13 Jan 2025 20:01:51 +0000
Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
README.md | 2 +-
docs/contributing.md | 18 +++++++++---------
docs/extensions/typed_returns.py | 2 +-
src/infercnvpy/_util.py | 2 +-
src/infercnvpy/tl/_copykat.py | 2 +-
src/infercnvpy/tl/_infercnv.py | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index dc68a4b..cb7443c 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ except in that they look similar, but not identical, to the results of InferCNV.
Please refer to the [documentation][link-docs]. In particular, the
-- [API documentation][link-api].
+- [API documentation][link-api].
## Installation
diff --git a/docs/contributing.md b/docs/contributing.md
index 9bbacf1..c7888af 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -99,11 +99,11 @@ Specify `vX.X.X` as a tag name and create a release. For more information, see [
Please write documentation for new or changed features and use-cases. This project uses [sphinx][] with the following features:
-- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text
-- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension).
-- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks))
-- [Sphinx autodoc typehints][], to automatically reference annotated input and output types
-- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/)
+- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text
+- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension).
+- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks))
+- [Sphinx autodoc typehints][], to automatically reference annotated input and output types
+- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/)
See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information
on how to write documentation.
@@ -120,10 +120,10 @@ repository.
#### Hints
-- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only
- if you do so can sphinx automatically create a link to the external documentation.
-- If building the documentation fails because of a missing link that is outside your control, you can add an entry to
- the `nitpick_ignore` list in `docs/conf.py`
+- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only
+ if you do so can sphinx automatically create a link to the external documentation.
+- If building the documentation fails because of a missing link that is outside your control, you can add an entry to
+ the `nitpick_ignore` list in `docs/conf.py`
#### Building the docs locally
diff --git a/docs/extensions/typed_returns.py b/docs/extensions/typed_returns.py
index 1135204..0fbffef 100644
--- a/docs/extensions/typed_returns.py
+++ b/docs/extensions/typed_returns.py
@@ -12,7 +12,7 @@
def _process_return(lines: Iterable[str]) -> Generator[str, None, None]:
for line in lines:
if m := re.fullmatch(r"(?P\w+)\s+:\s+(?P[\w.]+)", line):
- yield f'-{m["param"]} (:class:`~{m["type"]}`)'
+ yield f"-{m['param']} (:class:`~{m['type']}`)"
else:
yield line
diff --git a/src/infercnvpy/_util.py b/src/infercnvpy/_util.py
index a741d51..5eb5ad4 100644
--- a/src/infercnvpy/_util.py
+++ b/src/infercnvpy/_util.py
@@ -14,7 +14,7 @@ def _choose_mtx_rep(adata, use_raw=False, layer=None):
is_layer = layer is not None
if use_raw and is_layer:
raise ValueError(
- "Cannot use expression from both layer and raw. You provided:" f"'use_raw={use_raw}' and 'layer={layer}'"
+ f"Cannot use expression from both layer and raw. You provided:'use_raw={use_raw}' and 'layer={layer}'"
)
if is_layer:
return adata.layers[layer]
diff --git a/src/infercnvpy/tl/_copykat.py b/src/infercnvpy/tl/_copykat.py
index fdec659..08f1ca4 100644
--- a/src/infercnvpy/tl/_copykat.py
+++ b/src/infercnvpy/tl/_copykat.py
@@ -100,7 +100,7 @@ def copykat(
importr("stringr")
except ImportError:
raise ImportError(
- "copyKAT requires a valid R installation with the following packages: " "copykat, stringr"
+ "copyKAT requires a valid R installation with the following packages: copykat, stringr"
) from None
logging.info("Preparing R objects")
diff --git a/src/infercnvpy/tl/_infercnv.py b/src/infercnvpy/tl/_infercnv.py
index 81cc5c4..762819c 100644
--- a/src/infercnvpy/tl/_infercnv.py
+++ b/src/infercnvpy/tl/_infercnv.py
@@ -98,7 +98,7 @@ def infercnv(
raise ValueError("Ensure your var_names are unique!")
if {"chromosome", "start", "end"} - set(adata.var.columns) != set():
raise ValueError(
- "Genomic positions not found. There need to be `chromosome`, `start`, and " "`end` columns in `adata.var`. "
+ "Genomic positions not found. There need to be `chromosome`, `start`, and `end` columns in `adata.var`. "
)
var_mask = adata.var["chromosome"].isnull()