Skip to content

Commit 948d3a9

Browse files
[pre-commit.ci] pre-commit autoupdate (#88)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.11.2](astral-sh/ruff-pre-commit@v0.8.6...v0.11.2) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3fb2107 commit 948d3a9

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333

3434
- repo: https://github.com/astral-sh/ruff-pre-commit
3535
# Ruff version.
36-
rev: v0.8.6
36+
rev: v0.11.2
3737
hooks:
3838
- id: ruff
3939
args: [--fix, --exit-non-zero-on-fix]

src/summarizedexperiment/BaseSE.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,15 @@ def _validate_assays(assays, shape) -> tuple:
5858

5959
if len(mat.shape) > 2:
6060
raise ValueError(
61-
"Only 2-dimensional matrices are accepted, "
62-
f"provided {len(mat.shape)} dimensions for `assay`: '{asy}'."
61+
f"Only 2-dimensional matrices are accepted, provided {len(mat.shape)} dimensions for `assay`: '{asy}'."
6362
)
6463

6564
if shape is None:
6665
shape = mat.shape
6766
continue
6867

6968
if mat.shape != shape:
70-
raise ValueError(f"Assay: '{asy}' must be of shape '{shape}'" f" but provided '{mat.shape}'.")
69+
raise ValueError(f"Assay: '{asy}' must be of shape '{shape}' but provided '{mat.shape}'.")
7170

7271

7372
def _validate_rows(rows, names, shape):
@@ -83,8 +82,7 @@ def _validate_rows(rows, names, shape):
8382
if names is not None:
8483
if len(names) != shape[0]:
8584
raise ValueError(
86-
f"Length of 'row_names' mismatch with number of rows. Must be '{shape[0]}'"
87-
f" but provided '{len(names)}'."
85+
f"Length of 'row_names' mismatch with number of rows. Must be '{shape[0]}' but provided '{len(names)}'."
8886
)
8987

9088
if len(set(names)) != len(names):

src/summarizedexperiment/RangedSummarizedExperiment.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ def _access_granges(x: GRangesOrRangeSE) -> GenomicRanges:
6161

6262
def _validate_rowranges(row_ranges, shape):
6363
if not (isinstance(row_ranges, (GenomicRanges, GenomicRangesList))):
64-
raise TypeError(
65-
"`row_ranges` must be a `GenomicRanges` or `GenomicRangesList`" f" , provided {type(row_ranges)}."
66-
)
64+
raise TypeError(f"`row_ranges` must be a `GenomicRanges` or `GenomicRangesList` , provided {type(row_ranges)}.")
6765

6866
if len(row_ranges) != shape[0]:
6967
raise ValueError("Number of features in `row_ranges` and number of rows in assays do not match.")

0 commit comments

Comments
 (0)