Skip to content

Commit eb930fb

Browse files
author
Arina Danilina
committed
universal title and ruff fix
1 parent 6e4235c commit eb930fb

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/moscot/plotting/_plotting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def pull(
402402

403403
fig = _plot_scatter(
404404
adata=adata,
405-
generic_key=data["key"] if "key" in data else None,
405+
generic_key=data["key"],
406406
key_stored=key,
407407
source=data["source"],
408408
target=data["target"],

src/moscot/plotting/_utils.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,10 @@ def _plot_scatter(
429429
titles = [f"{categories if categories is not None else 'Cells'} at time {source if push else target}"]
430430
titles.extend([f"{name} at time {time_points[i]}" for i in range(1, len(time_points))])
431431
else:
432-
titles = (
433-
[f"{categories if categories is not None else 'Cells'} at time {source if push else target} and {name}"]
434-
if generic_key is None
435-
else [
432+
titles = ([
436433
f"{'Push' if push else 'Pull'} {categories if categories is not None else 'cells'} "
437434
+ f"from {source if push else target} to {target if push else source}"
438-
]
439-
)
435+
])
440436
for i, ax in enumerate(axs):
441437
# we need to create adata_view because otherwise the view of the adata is copied in the next step i+1
442438
with RandomKeys(adata, n=2, where="obs") as keys:

0 commit comments

Comments
 (0)