-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Closed as not planned
Copy link
Labels
Documentationstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action
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_interpd
def 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 line agg_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?
Metadata
Metadata
Assignees
Labels
Documentationstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action