Skip to content

Commit 4cc2b71

Browse files
committed
More fixes to pydocstyle D403 (First word capitalization)
1 parent 382be60 commit 4cc2b71

File tree

22 files changed

+60
-80
lines changed

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
@@ -867,10 +867,10 @@ def set_position(self, pos, which='both'):
867867

868868
def _set_position(self, pos, which='both'):
869869
"""
870-
private version of set_position. Call this internally
871-
to get the same functionality of `get_position`, but not
872-
to take the axis out of the constrained_layout
873-
hierarchy.
870+
Private version of set_position.
871+
872+
Call this internally to get the same functionality of `get_position`,
873+
but not to take the axis out of the constrained_layout hierarchy.
874874
"""
875875
if not isinstance(pos, mtransforms.BboxBase):
876876
pos = mtransforms.Bbox.from_bounds(*pos)
@@ -910,7 +910,7 @@ def get_axes_locator(self):
910910
return self._axes_locator
911911

912912
def _set_artist_props(self, a):
913-
"""set the boilerplate props for artists added to axes"""
913+
"""Set the boilerplate props for artists added to axes."""
914914
a.set_figure(self.figure)
915915
if not a.is_transform_set():
916916
a.set_transform(self.transData)
@@ -1762,11 +1762,11 @@ def get_legend(self):
17621762
return self.legend_
17631763

17641764
def get_images(self):
1765-
"""return a list of Axes images contained by the Axes"""
1765+
r"""Return a list of `.AxesImage`\s contained by the Axes."""
17661766
return cbook.silent_list('AxesImage', self.images)
17671767

17681768
def get_lines(self):
1769-
"""Return a list of lines contained by the Axes"""
1769+
"""Return a list of lines contained by the Axes."""
17701770
return cbook.silent_list('Line2D', self.lines)
17711771

17721772
def get_xaxis(self):
@@ -1989,7 +1989,7 @@ def add_patch(self, p):
19891989
return p
19901990

19911991
def _update_patch_limits(self, patch):
1992-
"""update the data limits for patch *p*"""
1992+
"""Update the data limits for the given patch."""
19931993
# hist can add zero height Rectangles, which is useful to keep
19941994
# the bins, counts and patches lined up, but it throws off log
19951995
# 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
@@ -1631,15 +1631,11 @@ def set_orientation(self, orientation=None):
16311631
self.switch_orientation()
16321632

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

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

lib/matplotlib/contour.py

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

12961296
def get_alpha(self):
1297-
"""returns alpha to be applied to all ContourSet artists"""
1297+
"""Return alpha to be applied to all ContourSet artists."""
12981298
return self.alpha
12991299

13001300
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)