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

Skip to content

Commit 19835f4

Browse files
authored
Merge pull request #21193 from anntzer/cont
Update contributing guide.
2 parents cde68fb + 87c545b commit 19835f4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

doc/devel/contributing.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ prevent unexpected breaking of code that uses Matplotlib.
290290
- If possible, usage of an deprecated API should emit a
291291
`.MatplotlibDeprecationWarning`. There are a number of helper tools for this:
292292

293-
- Use ``cbook.warn_deprecated()`` for general deprecation warnings.
294-
- Use the decorator ``@cbook.deprecated`` to deprecate classes, functions,
293+
- Use ``_api.warn_deprecated()`` for general deprecation warnings.
294+
- Use the decorator ``@_api.deprecated`` to deprecate classes, functions,
295295
methods, or properties.
296296
- To warn on changes of the function signature, use the decorators
297-
``@cbook._delete_parameter``, ``@cbook._rename_parameter``, and
298-
``@cbook._make_keyword_only``.
297+
``@_api.delete_parameter``, ``@_api.rename_parameter``, and
298+
``@_api.make_keyword_only``.
299299

300300
- Deprecated API may be removed two point-releases after they were deprecated.
301301

@@ -349,22 +349,22 @@ Keyword argument processing
349349
---------------------------
350350

351351
Matplotlib makes extensive use of ``**kwargs`` for pass-through customizations
352-
from one function to another. A typical example is in `matplotlib.pyplot.text`.
353-
The definition of the pylab text function is a simple pass-through to
354-
`matplotlib.axes.Axes.text`::
352+
from one function to another. A typical example is
353+
`~matplotlib.axes.Axes.text`. The definition of `matplotlib.pyplot.text` is a
354+
simple pass-through to `matplotlib.axes.Axes.text`::
355355

356-
# in pylab.py
357-
def text(*args, **kwargs):
358-
return gca().text(*args, **kwargs)
356+
# in pyplot.py
357+
def text(x, y, s, fontdict=None, **kwargs):
358+
return gca().text(x, y, s, fontdict=fontdict, **kwargs)
359359

360-
`~matplotlib.axes.Axes.text` in simplified form looks like this, i.e., it just
360+
`matplotlib.axes.Axes.text` (simplified for illustration) just
361361
passes all ``args`` and ``kwargs`` on to ``matplotlib.text.Text.__init__``::
362362

363363
# in axes/_axes.py
364-
def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
364+
def text(self, x, y, s, fontdict=None, **kwargs):
365365
t = Text(x=x, y=y, text=s, **kwargs)
366366

367-
and ``matplotlib.text.Text.__init__`` (again with liberties for illustration)
367+
and ``matplotlib.text.Text.__init__`` (again, simplified)
368368
just passes them on to the `matplotlib.artist.Artist.update` method::
369369

370370
# in text.py

0 commit comments

Comments
 (0)