Skip to content

Commit 24ff1a9

Browse files
committed
fix errors in processing handle style
1 parent 16d5b99 commit 24ff1a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/widgets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,9 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt=None,
425425
self.valinit = valinit
426426

427427
defaults = {'facecolor': 'white', 'edgecolor': '.75', 'size': 10}
428+
handle_style = {} if handle_style is None else handle_style
428429
marker_props = {
429-
f'marker{k}': v for k, v in {**defaults, **handle_style}
430+
f'marker{k}': v for k, v in {**defaults, **handle_style}.items()
430431
}
431432

432433
if orientation == 'vertical':
@@ -689,8 +690,9 @@ def __init__(
689690
self.valinit = valinit
690691

691692
defaults = {'facecolor': 'white', 'edgecolor': '.75', 'size': 10}
693+
handle_style = {} if handle_style is None else handle_style
692694
marker_props = {
693-
f'marker{k}': v for k, v in {**defaults, **handle_style}
695+
f'marker{k}': v for k, v in {**defaults, **handle_style}.items()
694696
}
695697

696698
if orientation == "vertical":

0 commit comments

Comments
 (0)