Skip to content

Commit ade813e

Browse files
committed
clean up slider docstrings + lint
1 parent f4d27e7 commit ade813e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/widgets/slider_snap_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
==========================
55
66
You can snap slider values to a discrete values using either the ``valstep``
7-
argument.
7+
argument.
88
99
In this example the Freq slider is constrained to be multiples of pi, and the
1010
Amp slider uses an array as the ``valstep`` argument to more densely sample

lib/matplotlib/widgets.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class Slider(AxesWidget):
255255
def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt=None,
256256
closedmin=True, closedmax=True, slidermin=None,
257257
slidermax=None, dragging=True, valstep=None,
258-
orientation='horizontal', initcolor='r', **kwargs):
258+
orientation='horizontal', *, initcolor='r', **kwargs):
259259
"""
260260
Parameters
261261
----------
@@ -295,16 +295,16 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt=None,
295295
dragging : bool, default: True
296296
If True the slider can be dragged by the mouse.
297297
298-
valstep : float or arraylike, default: None
298+
valstep : float or array-like, default: None
299299
If a float, the slider will snap to multiples of *valstep*.
300300
If an array the slider will snap to the values in the array.
301301
302302
orientation : {'horizontal', 'vertical'}, default: 'horizontal'
303303
The orientation of the slider.
304304
305305
initcolor : color or None, default: 'r'
306-
The color of the line drawn at the *valinit* position. If None
307-
then no line marking the inital position will be drawn.
306+
The color of the line at the *valinit* position. If None then
307+
no line will be drawn.
308308
309309
Notes
310310
-----
@@ -482,7 +482,7 @@ def set_val(self, val, validate=False):
482482
Parameters
483483
----------
484484
val : float
485-
validate : bool, default: False
485+
validate : bool, default: False
486486
Whether to transform *val* to conform to *valstep*,
487487
*valmin* and *valmax*
488488
"""

0 commit comments

Comments
 (0)