Skip to content

Commit 54b4263

Browse files
authored
Merge pull request #16873 from timhoffm/pydocstyle-D403
More fixes to pydocstyle D403 (First word capitalization)
2 parents ad76c83 + 4cc2b71 commit 54b4263

22 files changed

+60
-80
lines changed

lib/matplotlib/artist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ def set_clip_path(self, path, transform=None):
786786
def get_alpha(self):
787787
"""
788788
Return the alpha value used for blending - not supported on all
789-
backends
789+
backends.
790790
"""
791791
return self._alpha
792792

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3327,8 +3327,8 @@ def errorbar(self, x, y, yerr=None, xerr=None,
33273327

33283328
def xywhere(xs, ys, mask):
33293329
"""
3330-
return xs[mask], ys[mask] where mask is True but xs and
3331-
ys are not arrays
3330+
Return xs[mask], ys[mask] where mask is True but xs and
3331+
ys are not arrays.
33323332
"""
33333333
assert len(xs) == len(ys)
33343334
assert len(xs) == len(mask)

lib/matplotlib/axes/_base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -865,10 +865,10 @@ def set_position(self, pos, which='both'):
865865

866866
def _set_position(self, pos, which='both'):
867867
"""
868-
private version of set_position. Call this internally
869-
to get the same functionality of `get_position`, but not
870-
to take the axis out of the constrained_layout
871-
hierarchy.
868+
Private version of set_position.
869+
870+
Call this internally to get the same functionality of `get_position`,
871+
but not to take the axis out of the constrained_layout hierarchy.
872872
"""
873873
if not isinstance(pos, mtransforms.BboxBase):
874874
pos = mtransforms.Bbox.from_bounds(*pos)
@@ -908,7 +908,7 @@ def get_axes_locator(self):
908908
return self._axes_locator
909909

910910
def _set_artist_props(self, a):
911-
"""set the boilerplate props for artists added to axes"""
911+
"""Set the boilerplate props for artists added to axes."""
912912
a.set_figure(self.figure)
913913
if not a.is_transform_set():
914914
a.set_transform(self.transData)
@@ -1750,11 +1750,11 @@ def get_legend(self):
17501750
return self.legend_
17511751

17521752
def get_images(self):
1753-
"""return a list of Axes images contained by the Axes"""
1753+
r"""Return a list of `.AxesImage`\s contained by the Axes."""
17541754
return cbook.silent_list('AxesImage', self.images)
17551755

17561756
def get_lines(self):
1757-
"""Return a list of lines contained by the Axes"""
1757+
"""Return a list of lines contained by the Axes."""
17581758
return cbook.silent_list('Line2D', self.lines)
17591759

17601760
def get_xaxis(self):
@@ -1978,7 +1978,7 @@ def add_patch(self, p):
19781978
return p
19791979

19801980
def _update_patch_limits(self, patch):
1981-
"""update the data limits for patch *p*"""
1981+
"""Update the data limits for the given patch."""
19821982
# hist can add zero height Rectangles, which is useful to keep
19831983
# the bins, counts and patches lined up, but it throws off log
19841984
# scaling. We'll ignore rects with zero height or width in

lib/matplotlib/axes/_subplots.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ def change_geometry(self, numrows, numcols, num):
7878
self.set_position(self.figbox)
7979

8080
def get_subplotspec(self):
81-
"""get the SubplotSpec instance associated with the subplot"""
81+
"""Return the SubplotSpec instance associated with the subplot."""
8282
return self._subplotspec
8383

8484
def set_subplotspec(self, subplotspec):
85-
"""set the SubplotSpec instance associated with the subplot"""
85+
"""Set the SubplotSpec instance associated with the subplot."""
8686
self._subplotspec = subplotspec
8787

8888
def get_gridspec(self):
89-
"""get the GridSpec instance associated with the subplot"""
89+
"""Return the GridSpec instance associated with the subplot."""
9090
return self._subplotspec.get_gridspec()
9191

9292
def update_params(self):
93-
"""update the subplot position from fig.subplotpars"""
93+
"""Update the subplot position from ``self.figure.subplotpars``."""
9494
self.figbox, _, _, self.numRows, self.numCols = \
9595
self.get_subplotspec().get_position(self.figure,
9696
return_all=True)

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,8 @@ def restore(self):
753753

754754
def get_alpha(self):
755755
"""
756-
Return the alpha value used for blending - not supported on
757-
all backends.
756+
Return the alpha value used for blending - not supported on all
757+
backends.
758758
"""
759759
return self._alpha
760760

lib/matplotlib/backends/backend_ps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ def xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
12141214

12151215
def get_bbox_header(lbrt, rotated=False):
12161216
"""
1217-
return a postscript header string for the given bbox lbrt=(l, b, r, t).
1217+
Return a postscript header string for the given bbox lbrt=(l, b, r, t).
12181218
Optionally, return rotate command.
12191219
"""
12201220

lib/matplotlib/backends/backend_wx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def set_joinstyle(self, js):
417417
self.unselect()
418418

419419
def get_wxcolour(self, color):
420-
"""return a wx.Colour from RGB format"""
420+
"""Convert the given RGB(A) color to a wx.Colour."""
421421
_log.debug("%s - get_wx_color()", type(self))
422422
if len(color) == 3:
423423
r, g, b = color
@@ -1407,7 +1407,7 @@ def remove_toolitem(self, name):
14071407

14081408

14091409
class StatusbarWx(StatusbarBase, wx.StatusBar):
1410-
"""for use with ToolManager"""
1410+
"""For use with ToolManager."""
14111411
def __init__(self, parent, *args, **kwargs):
14121412
StatusbarBase.__init__(self, *args, **kwargs)
14131413
wx.StatusBar.__init__(self, parent, -1)

lib/matplotlib/collections.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,15 +1630,11 @@ def set_orientation(self, orientation=None):
16301630
self.switch_orientation()
16311631

16321632
def get_linelength(self):
1633-
"""
1634-
get the length of the lines used to mark each event
1635-
"""
1633+
"""Return the length of the lines used to mark each event."""
16361634
return self._linelength
16371635

16381636
def set_linelength(self, linelength):
1639-
"""
1640-
set the length of the lines used to mark each event
1641-
"""
1637+
"""Set the length of the lines used to mark each event."""
16421638
if linelength == self.get_linelength():
16431639
return
16441640
lineoffset = self.get_lineoffset()

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ def _process_linestyles(self):
12951295
return tlinestyles
12961296

12971297
def get_alpha(self):
1298-
"""returns alpha to be applied to all ContourSet artists"""
1298+
"""Return alpha to be applied to all ContourSet artists."""
12991299
return self.alpha
13001300

13011301
def set_alpha(self, alpha):

lib/matplotlib/image.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,8 @@ def get_filterrad(self):
819819

820820
class AxesImage(_ImageBase):
821821
"""
822+
An image attached to an Axes.
823+
822824
Parameters
823825
----------
824826
ax : `~.axes.Axes`
@@ -1270,6 +1272,8 @@ def get_cursor_data(self, event):
12701272

12711273

12721274
class FigureImage(_ImageBase):
1275+
"""An image attached to a figure."""
1276+
12731277
zorder = 0
12741278

12751279
_interpolation = 'nearest'

0 commit comments

Comments
 (0)