Skip to content

Commit b72098b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 507ac65 commit b72098b

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

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)