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

Skip to content

Commit 9b6c7ad

Browse files
committed
Do not use "object" or "instance" when documenting types
1 parent 9d00ca8 commit 9b6c7ad

20 files changed

Lines changed: 32 additions & 34 deletions

lib/matplotlib/artist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def get_tightbbox(self, renderer):
266266
267267
Parameters
268268
----------
269-
renderer : `.RendererBase` instance
269+
renderer : `.RendererBase` subclass
270270
renderer that will be used to draw the figures (i.e.
271271
``fig.canvas.get_renderer()``)
272272

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7485,7 +7485,7 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
74857485
The times corresponding to midpoints of segments (i.e., the columns
74867486
in *spectrum*).
74877487
7488-
im : instance of class `.AxesImage`
7488+
im : `.AxesImage`
74897489
The image created by imshow containing the spectrogram.
74907490
74917491
See Also

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4309,7 +4309,7 @@ def get_tightbbox(self, renderer, call_axes_locator=True,
43094309
43104310
Parameters
43114311
----------
4312-
renderer : `.RendererBase` instance
4312+
renderer : `.RendererBase` subclass
43134313
renderer that will be used to draw the figures (i.e.
43144314
``fig.canvas.get_renderer()``)
43154315

lib/matplotlib/cm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ def __init__(self, norm=None, cmap=None):
159159
160160
Parameters
161161
----------
162-
norm : :class:`matplotlib.colors.Normalize` instance
162+
norm : `matplotlib.colors.Normalize` (or subclass thereof)
163163
The normalizing object which scales data, typically into the
164164
interval ``[0, 1]``.
165165
If *None*, *norm* defaults to a *colors.Normalize* object which
166166
initializes its scaling based on the first data processed.
167-
cmap : str or :class:`~matplotlib.colors.Colormap` instance
167+
cmap : str or `~matplotlib.colors.Colormap`
168168
The colormap used to map normalized data values to RGBA colors.
169169
"""
170170

lib/matplotlib/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ def __init__(self,
14701470
"""
14711471
Parameters
14721472
----------
1473-
positions : 1D array-like object
1473+
positions : 1D array-like
14741474
Each value is an event.
14751475
14761476
orientation : {None, 'horizontal', 'vertical'}, optional

lib/matplotlib/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@
161161
162162
fig.colorbar(cm.ScalarMappable(norm=norm, cmap=cmap), ax=ax)
163163
164-
cax : :class:`~matplotlib.axes.Axes` object, optional
164+
cax : `~matplotlib.axes.Axes`, optional
165165
Axes into which the colorbar will be drawn.
166166
167-
ax : :class:`~matplotlib.axes.Axes`, list of Axes, optional
167+
ax : `~matplotlib.axes.Axes`, list of Axes, optional
168168
Parent axes from which space for a new colorbar axes will be stolen.
169169
If a list of axes is given they will all be resized to make room for the
170170
colorbar axes.

lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ def shade(self, data, cmap, norm=None, blend_mode='overlay', vmin=None,
17471747
data : array-like
17481748
A 2d array (or equivalent) of the height values used to generate a
17491749
shaded map.
1750-
cmap : `~matplotlib.colors.Colormap` instance
1750+
cmap : `~matplotlib.colors.Colormap`
17511751
The colormap used to color the *data* array. Note that this must be
17521752
a `~matplotlib.colors.Colormap` instance. For example, rather than
17531753
passing in `cmap='gist_earth'`, use

lib/matplotlib/dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def datestr2num(d, default=None):
382382
d : str or sequence of str
383383
The dates to convert.
384384
385-
default : datetime instance, optional
385+
default : datetime.datetime, optional
386386
The default date to use when fields are missing in *d*.
387387
"""
388388
if isinstance(d, str):

lib/matplotlib/figure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
14541454
14551455
Returns
14561456
-------
1457-
ax : `~.axes.Axes` object or array of Axes objects.
1457+
ax : `~.axes.Axes` or array of Axes
14581458
*ax* can be either a single `~matplotlib.axes.Axes` object or
14591459
an array of Axes objects if more than one subplot was created. The
14601460
dimensions of the resulting array can be controlled with the
@@ -1792,7 +1792,7 @@ def legend(self, *args, **kwargs):
17921792
17931793
Returns
17941794
-------
1795-
:class:`matplotlib.legend.Legend` instance
1795+
`~matplotlib.legend.Legend`
17961796
17971797
Notes
17981798
-----
@@ -2356,7 +2356,7 @@ def get_tightbbox(self, renderer, bbox_extra_artists=None):
23562356
23572357
Parameters
23582358
----------
2359-
renderer : `.RendererBase` instance
2359+
renderer : `.RendererBase` subclass
23602360
renderer that will be used to draw the figures (i.e.
23612361
``fig.canvas.get_renderer()``)
23622362

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def composite_images(images, renderer, magnification=1.0):
6969
enforced by this function. Each image must have a purely
7070
affine transformation with no shear.
7171
72-
renderer : RendererBase instance
72+
renderer : `.RendererBase`
7373
7474
magnification : float
7575
The additional magnification to apply for the renderer in use.

0 commit comments

Comments
 (0)