Skip to content

Commit 28a1ed4

Browse files
ci: pre-commit autoupdate (#3931)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 78ace2c commit 28a1ed4

14 files changed

Lines changed: 34 additions & 18 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ci:
33

44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
6-
rev: v0.14.9
6+
rev: v0.14.10
77
hooks:
88
- id: ruff-check
99
args: ["--fix"]
@@ -20,7 +20,7 @@ repos:
2020
- --sort-by-bibkey
2121
- --drop=abstract
2222
- repo: https://github.com/biomejs/pre-commit
23-
rev: v2.3.8
23+
rev: v2.3.10
2424
hooks:
2525
- id: biome-format
2626
- repo: https://github.com/ComPWA/taplo-pre-commit

src/scanpy/get/get.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def rank_genes_groups_df(
9696
for pts, name in {"pts": "pct_nz_group", "pts_rest": "pct_nz_reference"}.items():
9797
if pts in adata.uns[key]:
9898
pts_df = (
99-
adata.uns[key][pts][group]
99+
adata
100+
.uns[key][pts][group]
100101
.rename_axis(index="names")
101102
.reset_index()
102103
.melt(id_vars="names", var_name="group", value_name=name)

src/scanpy/plotting/_dotplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ def __init__( # noqa: PLR0913
203203
# 2. compute mean expression value value
204204
if mean_only_expressed:
205205
dot_color_df = (
206-
self.obs_tidy.mask(~obs_bool)
206+
self.obs_tidy
207+
.mask(~obs_bool)
207208
.groupby(level=0, observed=True)
208209
.mean()
209210
.fillna(0)

src/scanpy/plotting/_matrixplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ def __init__( # noqa: PLR0913
169169
if values_df is None:
170170
# compute mean value
171171
values_df = (
172-
self.obs_tidy.groupby(level=0, observed=True)
172+
self.obs_tidy
173+
.groupby(level=0, observed=True)
173174
.mean()
174175
.loc[
175176
self.categories_order

src/scanpy/plotting/_stacked_violin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ def _mainplot(self, ax: Axes):
392392
# get mean values for color and transform to color values
393393
# using colormap
394394
_color_df = (
395-
_matrix.groupby(level=0, observed=True)
395+
_matrix
396+
.groupby(level=0, observed=True)
396397
.median()
397398
.loc[
398399
self.categories_order
@@ -495,7 +496,8 @@ def _make_rows_of_violinplots(
495496
# This format is convenient to aggregate per gene or per category
496497
# while making the violin plots.
497498
df = (
498-
pd.DataFrame(_matrix.stack(future_stack=True))
499+
pd
500+
.DataFrame(_matrix.stack(future_stack=True))
499501
.reset_index()
500502
.rename(
501503
columns={

src/scanpy/plotting/_tools/paga.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ def paga_compare( # noqa: PLR0912, PLR0913
166166
)[0]
167167
coords = _basis[:, dims]
168168
pos = (
169-
pd.DataFrame(coords, columns=["x", "y"], index=adata.obs_names)
169+
pd
170+
.DataFrame(coords, columns=["x", "y"], index=adata.obs_names)
170171
.groupby(adata.obs[color], observed=True)
171172
.median()
172173
.sort_index()

src/scanpy/plotting/_tools/scatterplots.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,8 @@ def _add_categorical_legend( # noqa: PLR0913
11341134
# identify centroids to put labels
11351135

11361136
all_pos = (
1137-
pd.DataFrame(scatter_array, columns=["x", "y"])
1137+
pd
1138+
.DataFrame(scatter_array, columns=["x", "y"])
11381139
.groupby(color_source_vector, observed=True)
11391140
.median()
11401141
# Have to sort_index since if observed=True and categorical is unordered

src/scanpy/preprocessing/_highly_variable_genes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def sum_and_sum_squares_clipped_from_block(block):
7171
return np.vstack(clip_square_sum(block, clip_val))[None, ...]
7272

7373
squared_batch_counts_sum, batch_counts_sum = (
74-
data_batch.map_blocks(
74+
data_batch
75+
.map_blocks(
7576
sum_and_sum_squares_clipped_from_block,
7677
new_axis=(1,),
7778
chunks=((1,) * n_blocks, (2,), (data_batch.shape[1],)),

src/scanpy/preprocessing/_pca/_dask.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def fit(self, x: DaskArray) -> PCAEighDaskFit:
3535
>>> import dask.array as da
3636
>>> import scipy.sparse as sp
3737
>>> x = (
38-
... da.array(sp.random(100, 200, density=0.3, dtype="int64").toarray())
38+
... da
39+
... .array(sp.random(100, 200, density=0.3, dtype="int64").toarray())
3940
... .rechunk((10, -1))
4041
... .map_blocks(sp.csr_matrix)
4142
... )

src/scanpy/preprocessing/_scrublet/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ def _scrublet_call_doublets( # noqa: PLR0913
471471
"parameters": {
472472
"expected_doublet_rate": expected_doublet_rate,
473473
"sim_doublet_ratio": (
474-
adata_sim.uns.get("scrublet", {})
474+
adata_sim.uns
475+
.get("scrublet", {})
475476
.get("parameters", {})
476477
.get("sim_doublet_ratio", None)
477478
),

0 commit comments

Comments
 (0)