Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed as not planned
Description
Bug report
After switching to the numpydoc format, it's a common situation that one wants to add a docstring interpolation to the a parameter entry, e.g.
@docstring.dedent_interpddef axhline(self, y=0, xmin=0, xmax=1, **kwargs): """ Add a horizontal line across the axis. [...] Other Parameters ---------------- **kwargs : Valid kwargs are :class:`~matplotlib.lines.Line2D` properties, with the exception of 'transform': %(Line2D)s"""
The resulting docstring is:
Other Parameters----------------**kwargs : Valid kwargs are :class:`~matplotlib.lines.Line2D` properties, with the exception of 'transform': agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha: float (0.0 transparent through 1.0 opaque) animated: bool [...]
Note that the first lineagg_filter
is correctly indented. However, the following inserted lines are missing the indent before the%(Line2D)s
in the original string.
This is a general problem if the inserted string is multi-line (basically always) and the format string should be indented as in the parameter list.
Any clever ideas to get this working?