Skip to content

Commit 6cfad71

Browse files
committed
removed unnecessary dict comprehension
1 parent a1b5f98 commit 6cfad71

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/napari_clusters_plotter/_new_plotter_widget.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,7 @@ def _apply_layer_color(layer, colors):
464464
elif isinstance(layer, napari.layers.Labels):
465465

466466
colors = np.insert(colors, 0, [0, 0, 0, 0], axis=0)
467-
color_dict = {
468-
label: color for label, color in zip(np.unique(layer.data), colors)
469-
}
467+
color_dict = dict(zip(np.unique(layer.data), colors))
470468

471469
# Insert default colors for labels that are not in the color_dict
472470
# Relevant for non-sequential label images

0 commit comments

Comments
 (0)