Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (scverse#3038)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philipp A <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and flying-sheep authored Apr 30, 2024
1 parent a008ab8 commit c3cfa74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.4.2
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand Down
6 changes: 3 additions & 3 deletions scanpy/external/exporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def spring_project(
)
else:
raise ValueError(
"Run the specified embedding method `%s` first." % embedding_method
f"Run the specified embedding method `{embedding_method}` first."
)

coords = adata.obsm[embedding_method]
Expand Down Expand Up @@ -332,13 +332,13 @@ def _write_graph(filename, n_nodes, edges):
def _write_edges(filename, edges):
with Path(filename).open("w") as f:
for e in edges:
f.write("%i;%i\n" % (e[0], e[1]))
f.write(f"{e[0]};{e[1]}\n")


def _write_color_tracks(ctracks, fname):
out = []
for name, score in ctracks.items():
line = name + "," + ",".join(["%.3f" % x for x in score])
line = f"{name}," + ",".join(f"{x:.3f}" for x in score)
out += [line]
out = sorted(out, key=lambda x: x.split(",")[0])
Path(fname).write_text("\n".join(out))
Expand Down
2 changes: 1 addition & 1 deletion scanpy/plotting/_scrublet.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def scrublet_score_distribution(
doublet_scores_sim = adata.uns["scrublet"]["batches"][batch_key][
"doublet_scores_sim"
]
axis_lab_suffix = " (%s)" % batch_key
axis_lab_suffix = f" ({batch_key})"
obs_ax = axs[idx][0]
sim_ax = axs[idx][1]

Expand Down

0 comments on commit c3cfa74

Please sign in to comment.