Skip to content

Commit 31bda1e

Browse files
authored
Merge pull request #21204 from meeseeksmachine/auto-backport-of-pr-21193-on-v3.5.x
Backport PR #21193 on branch v3.5.x (Update contributing guide.)
2 parents 27cc744 + 5a51478 commit 31bda1e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

doc/devel/contributing.rst

+13-13
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

@@ -354,22 +354,22 @@ Keyword argument processing
354354
---------------------------
355355

356356
Matplotlib makes extensive use of ``**kwargs`` for pass-through customizations
357-
from one function to another. A typical example is in `matplotlib.pyplot.text`.
358-
The definition of the pylab text function is a simple pass-through to
359-
`matplotlib.axes.Axes.text`::
357+
from one function to another. A typical example is
358+
`~matplotlib.axes.Axes.text`. The definition of `matplotlib.pyplot.text` is a
359+
simple pass-through to `matplotlib.axes.Axes.text`::
360360

361-
# in pylab.py
362-
def text(*args, **kwargs):
363-
return gca().text(*args, **kwargs)
361+
# in pyplot.py
362+
def text(x, y, s, fontdict=None, **kwargs):
363+
return gca().text(x, y, s, fontdict=fontdict, **kwargs)
364364

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

368368
# in axes/_axes.py
369-
def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
369+
def text(self, x, y, s, fontdict=None, **kwargs):
370370
t = Text(x=x, y=y, text=s, **kwargs)
371371

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

375375
# in text.py

0 commit comments

Comments
 (0)