Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 219e8dc

Browse files
committed
Enforce pydocstyle D412
1 parent 3a7a47a commit 219e8dc

26 files changed

+38
-113
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ignore =
1414
D100, D101, D102, D103, D104, D105, D106, D107,
1515
D200, D202, D203, D204, D205, D207, D208, D209, D212, D213,
1616
D300, D301
17-
D400, D401, D402, D403, D412, D413,
17+
D400, D401, D402, D403, D413,
1818

1919
exclude =
2020
.git

examples/text_labels_and_annotations/arrow_demo.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,25 @@ def make_arrow_plot(data, size=4, display='length', shape='right',
3131
**kwargs):
3232
"""Makes an arrow plot.
3333
34-
Parameters:
35-
36-
data: dict with probabilities for the bases and pair transitions.
37-
size: size of the graph in inches.
38-
display: 'length', 'width', or 'alpha' for arrow property to change.
39-
shape: 'full', 'left', or 'right' for full or half arrows.
40-
max_arrow_width: maximum width of an arrow, data coordinates.
41-
arrow_sep: separation between arrows in a pair, data coordinates.
42-
alpha: maximum opacity of arrows, default 0.8.
43-
44-
**kwargs can be anything allowed by a Arrow object, e.g.
45-
linewidth and edgecolor.
34+
Parameters
35+
----------
36+
data
37+
Dict with probabilities for the bases and pair transitions.
38+
size
39+
Size of the graph in inches.
40+
display : {'length', 'width', 'alpha'}
41+
The arrow property to change.
42+
shape : {'full', 'left', 'right'}
43+
For full or half arrows.
44+
max_arrow_width : float
45+
Maximum width of an arrow, data coordinates.
46+
arrow_sep : float
47+
Separation between arrows in a pair, data coordinates.
48+
alpha : float
49+
Maximum opacity of arrows.
50+
**kwargs
51+
Can be anything allowed by a Arrow object, e.g. *linewidth* or
52+
*edgecolor*.
4653
"""
4754

4855
plt.xlim(-0.5, 1.5)

lib/matplotlib/_constrained_layout.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ def do_constrained_layout(fig, renderer, h_pad, w_pad,
8787
8888
Parameters
8989
----------
90-
91-
9290
fig : Figure
9391
is the ``figure`` instance to do the layout in.
9492

lib/matplotlib/_pylab_helpers.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ class Gcf:
1515
methods that operate on those attributes, accessing them
1616
directly as class attributes.
1717
18-
Attributes:
19-
20-
*figs*:
18+
Attributes
19+
----------
20+
figs
2121
dictionary of the form {*num*: *manager*, ...}
22-
23-
*_activeQue*:
22+
_activeQue
2423
list of *managers*, with active one at the end
2524
2625
"""

lib/matplotlib/animation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,6 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
968968
969969
Parameters
970970
----------
971-
972971
filename : str
973972
The output filename, e.g., :file:`mymovie.mp4`.
974973

lib/matplotlib/artist.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,6 @@ def set_sketch_params(self, scale=None, length=None, randomness=None):
614614
615615
Parameters
616616
----------
617-
618617
scale : float, optional
619618
The amplitude of the wiggle perpendicular to the source
620619
line, in pixels. If scale is `None`, or not provided, no
@@ -1018,7 +1017,6 @@ def sticky_edges(self):
10181017
10191018
Examples
10201019
--------
1021-
10221020
>>> artist.sticky_edges.x[:] = (xmin, xmax)
10231021
>>> artist.sticky_edges.y[:] = (ymin, ymax)
10241022

lib/matplotlib/axes/_axes.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ def legend(self, *args, **kwargs):
358358
359359
Parameters
360360
----------
361-
362361
handles : sequence of `.Artist`, optional
363362
A list of Artists (lines, patches) to be added to the legend.
364363
Use this together with *labels*, if you need full control on what
@@ -376,7 +375,6 @@ def legend(self, *args, **kwargs):
376375
377376
Other Parameters
378377
----------------
379-
380378
%(_legend_kw_doc)s
381379
382380
Returns
@@ -385,13 +383,11 @@ def legend(self, *args, **kwargs):
385383
386384
Notes
387385
-----
388-
389386
Not all kinds of artist are supported by the legend command. See
390387
:doc:`/tutorials/intermediate/legend_guide` for details.
391388
392389
Examples
393390
--------
394-
395391
.. plot:: gallery/text_labels_and_annotations/legend.py
396392
"""
397393
handles, labels, extra_args, kwargs = mlegend._parse_legend_args(
@@ -414,12 +410,10 @@ def inset_axes(self, bounds, *, transform=None, zorder=5,
414410
415411
Warnings
416412
--------
417-
418413
This method is experimental as of 3.0, and the API may change.
419414
420415
Parameters
421416
----------
422-
423417
bounds : [x0, y0, width, height]
424418
Lower-left corner of inset axes, and its width and height.
425419
@@ -438,13 +432,11 @@ def inset_axes(self, bounds, *, transform=None, zorder=5,
438432
439433
Returns
440434
-------
441-
442435
Axes
443436
The created `.axes.Axes` instance.
444437
445438
Examples
446439
--------
447-
448440
This example makes two inset axes, the first is in axes-relative
449441
coordinates, and the second in data-coordinates::
450442
@@ -485,13 +477,11 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
485477
486478
Warnings
487479
--------
488-
489480
This method is experimental as of 3.0, and the API may change.
490481
491482
492483
Parameters
493484
----------
494-
495485
bounds : [x0, y0, width, height]
496486
Lower-left corner of rectangle to be marked, and its width
497487
and height.
@@ -525,7 +515,6 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
525515
526516
Returns
527517
-------
528-
529518
rectangle_patch : `.Patches.Rectangle`
530519
Rectangle artist.
531520
@@ -588,12 +577,10 @@ def indicate_inset_zoom(self, inset_ax, **kwargs):
588577
589578
Warnings
590579
--------
591-
592580
This method is experimental as of 3.0, and the API may change.
593581
594582
Parameters
595583
----------
596-
597584
inset_ax : `.Axes`
598585
Inset axes to draw connecting lines to. Two lines are
599586
drawn connecting the indicator box to the inset axes on corners
@@ -604,7 +591,6 @@ def indicate_inset_zoom(self, inset_ax, **kwargs):
604591
605592
Returns
606593
-------
607-
608594
rectangle_patch : `.Patches.Rectangle`
609595
Rectangle artist.
610596
@@ -635,7 +621,6 @@ def secondary_xaxis(self, location, *, functions=None, **kwargs):
635621
636622
Examples
637623
--------
638-
639624
The main axis shows frequency, and the secondary axis shows period.
640625
641626
.. plot::
@@ -671,7 +656,6 @@ def secondary_yaxis(self, location, *, functions=None, **kwargs):
671656
672657
Examples
673658
--------
674-
675659
Add a secondary axes that converts from radians to degrees
676660
677661
.. plot::
@@ -827,7 +811,6 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
827811
828812
Examples
829813
--------
830-
831814
* draw a thick red hline at 'y' = 0 that spans the xrange::
832815
833816
>>> axhline(linewidth=4, color='r')
@@ -1272,22 +1255,19 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
12721255
12731256
Returns
12741257
-------
1275-
12761258
list : A list of :class:`~.collections.EventCollection` objects.
12771259
Contains the :class:`~.collections.EventCollection` that
12781260
were added.
12791261
12801262
Notes
12811263
-----
1282-
12831264
For *linelengths*, *linewidths*, *colors*, and *linestyles*, if only
12841265
a single value is given, that value is applied to all lines. If an
12851266
array-like is given, it must have the same length as *positions*, and
12861267
each value will be applied to the corresponding row of the array.
12871268
12881269
Examples
12891270
--------
1290-
12911271
.. plot:: gallery/lines_bars_and_markers/eventplot_demo.py
12921272
"""
12931273
self._process_unit_info(xdata=positions,
@@ -2738,7 +2718,6 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
27382718
27392719
Notes
27402720
-----
2741-
27422721
.. seealso::
27432722
The MATLAB function
27442723
`stem <http://www.mathworks.com/help/techdoc/ref/stem.html>`_
@@ -3787,7 +3766,6 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
37873766
37883767
Parameters
37893768
----------
3790-
37913769
bxpstats : list of dicts
37923770
A list of dictionaries containing stats for each boxplot.
37933771
Required keys are:
@@ -3913,7 +3891,6 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
39133891
39143892
Examples
39153893
--------
3916-
39173894
.. plot:: gallery/statistics/bxp.py
39183895
39193896
"""
@@ -4397,7 +4374,6 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
43974374
43984375
Notes
43994376
-----
4400-
44014377
* The `.plot` function will be faster for scatterplots where markers
44024378
don't vary in size or color.
44034379
@@ -5821,7 +5797,6 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
58215797
58225798
Notes
58235799
-----
5824-
58255800
**Masked arrays**
58265801
58275802
*X*, *Y* and *C* may be masked arrays. If either ``C[i, j]``, or one
@@ -6058,7 +6033,6 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
60586033
60596034
Notes
60606035
-----
6061-
60626036
**Masked arrays**
60636037
60646038
*C* may be a masked array. If ``C[i, j]`` is masked, the corresponding
@@ -7919,7 +7893,6 @@ def violinplot(self, dataset, positions=None, vert=True, widths=0.5,
79197893
79207894
Returns
79217895
-------
7922-
79237896
result : dict
79247897
A dictionary mapping each component of the violinplot to a
79257898
list of the corresponding collection instances created. The
@@ -7972,7 +7945,6 @@ def violin(self, vpstats, positions=None, vert=True, widths=0.5,
79727945
79737946
Parameters
79747947
----------
7975-
79767948
vpstats : list of dicts
79777949
A list of dictionaries containing stats for each violin plot.
79787950
Required keys are:

lib/matplotlib/axes/_base.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2932,7 +2932,6 @@ def tick_params(self, axis='both', **kwargs):
29322932
29332933
Other Parameters
29342934
----------------
2935-
29362935
axis : {'x', 'y', 'both'}
29372936
Axis on which to operate; default is 'both'.
29382937
@@ -2995,7 +2994,6 @@ def tick_params(self, axis='both', **kwargs):
29952994
29962995
Examples
29972996
--------
2998-
29992997
Usage ::
30002998
30012999
ax.tick_params(direction='out', length=6, width=2, colors='r',
@@ -3990,7 +3988,6 @@ def _set_view_from_bbox(self, bbox, direction='in',
39903988
39913989
Parameters
39923990
----------
3993-
39943991
bbox : 4-tuple or 3 tuple
39953992
* If bbox is a 4 tuple, it is the selected bounding box limits,
39963993
in *display* coordinates.

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ def set_color(self, color):
424424
_secax_docstring = '''
425425
Warnings
426426
--------
427-
428427
This method is experimental as of 3.1, and the API may change.
429428
430429
Parameters

lib/matplotlib/backend_bases.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2235,7 +2235,6 @@ def new_timer(self, *args, **kwargs):
22352235
22362236
Examples
22372237
--------
2238-
22392238
>>> timer = fig.canvas.new_timer(callbacks=[(f1, (1, ), {'a': 3}),])
22402239
22412240
"""

lib/matplotlib/backends/backend_pdf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,6 @@ class PdfPages:
23302330
23312331
Examples
23322332
--------
2333-
23342333
>>> import matplotlib.pyplot as plt
23352334
>>> # Initialize:
23362335
>>> with PdfPages('foo.pdf') as pdf:
@@ -2342,7 +2341,6 @@ class PdfPages:
23422341
23432342
Notes
23442343
-----
2345-
23462344
In reality :class:`PdfPages` is a thin wrapper around :class:`PdfFile`, in
23472345
order to avoid confusion when using :func:`~matplotlib.pyplot.savefig` and
23482346
forgetting the format argument.
@@ -2355,7 +2353,6 @@ def __init__(self, filename, keep_empty=True, metadata=None):
23552353
23562354
Parameters
23572355
----------
2358-
23592356
filename : str
23602357
Plots using :meth:`PdfPages.savefig` will be written to a file at
23612358
this location. The file is opened at once and any older file with
@@ -2414,7 +2411,6 @@ def savefig(self, figure=None, **kwargs):
24142411
24152412
Parameters
24162413
----------
2417-
24182414
figure : :class:`~matplotlib.figure.Figure` or int, optional
24192415
Specifies what figure is saved to file. If not specified, the
24202416
active figure is saved. If a :class:`~matplotlib.figure.Figure`

0 commit comments

Comments
 (0)