Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 18, 2024
1 parent 92c01d0 commit cfcd67d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions napari_clusters_plotter/_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,9 @@ def run(
and plot_cluster_name in list(features.keys())
):
if self.plot_hide_non_selected.isChecked():
features.loc[
features[plot_cluster_name] == 0, plot_cluster_name
] = -1 # make unselected points to noise points
features.loc[features[plot_cluster_name] == 0, plot_cluster_name] = (

Check warning on line 610 in napari_clusters_plotter/_plotter.py

View check run for this annotation

Codecov / codecov/patch

napari_clusters_plotter/_plotter.py#L610

Added line #L610 was not covered by tests
-1
) # make unselected points to noise points

# fill all prediction nan values with -1 -> turns them
# into noise points
Expand Down
16 changes: 10 additions & 6 deletions napari_clusters_plotter/_plotter_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ def alphas_unclustered(frame_id, current_frame, n_datapoints):
return alpha_f * initial_alpha
else:
alphas_unclustered = [
alpha_f * initial_alpha
if tp == current_frame
else alpha_f * initial_alpha * 0.3
(
alpha_f * initial_alpha
if tp == current_frame
else alpha_f * initial_alpha * 0.3
)
for tp in frame_id
]
return alphas_unclustered
Expand Down Expand Up @@ -292,9 +294,11 @@ def colors_clustered(cluster_id, frame_id, current_frame, color_hex_list):
return colors

colors = [
gen_highlight(color_hex_list[int(x) % len(color_hex_list)])
if tp == current_frame
else color_hex_list[int(x) % len(color_hex_list)]
(
gen_highlight(color_hex_list[int(x) % len(color_hex_list)])
if tp == current_frame
else color_hex_list[int(x) % len(color_hex_list)]
)
for x, tp in zip(cluster_id, frame_id)
]
return colors
Expand Down

0 comments on commit cfcd67d

Please sign in to comment.