Title: Docstring interpolation does not work correctly for indented insertions · Issue #10161 · matplotlib/matplotlib · GitHub
Open Graph Title: Docstring interpolation does not work correctly for indented insertions · Issue #10161 · matplotlib/matplotlib
X Title: Docstring interpolation does not work correctly for indented insertions · Issue #10161 · matplotlib/matplotlib
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...
Open Graph 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,...
X 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(s...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10161
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Docstring interpolation does not work correctly for indented insertions","articleBody":"### Bug report\r\n\r\nAfter 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.\r\n\r\n~~~\r\n@docstring.dedent_interpd\r\ndef axhline(self, y=0, xmin=0, xmax=1, **kwargs):\r\n \"\"\"\r\n Add a horizontal line across the axis.\r\n\r\n [...]\r\n\r\n Other Parameters\r\n ----------------\r\n **kwargs :\r\n Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,\r\n with the exception of 'transform':\r\n\r\n %(Line2D)s\r\n\"\"\"\r\n~~~\r\n\r\nThe resulting docstring is:\r\n\r\n~~~\r\nOther Parameters\r\n----------------\r\n**kwargs :\r\n Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,\r\n with the exception of 'transform':\r\n\r\n agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \r\n alpha: float (0.0 transparent through 1.0 opaque) \r\n animated: bool \r\n [...]\r\n~~~\r\n\r\nNote 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.\r\n\r\nThis 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.\r\n\r\nAny clever ideas to get this working?","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2018-01-04T16:31:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/10161/matplotlib/issues/10161"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:da51473b-c093-a860-faf9-7a242c1f597d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D104:27A3BF:10124C7:16062B4:6A53BA25 |
| html-safe-nonce | f65d8576887729bec155f82adb803938962cac3d93693604b8f7004d15727f19 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTA0OjI3QTNCRjoxMDEyNEM3OjE2MDYyQjQ6NkE1M0JBMjUiLCJ2aXNpdG9yX2lkIjoiODMzNzczNjM3MzMxNTU0OTczNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0d500ca56b4d2007922f9392830bd5ff3a5744ac394b859bf76a63c89527e58f |
| hovercard-subject-tag | issue:286041092 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/10161/issue_layout |
| twitter:image | https://opengraph.githubassets.com/20ec9673716e9dcc0ce55a93e26be0060c744257651a5fa5fe224dd3064e9031/matplotlib/matplotlib/issues/10161 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/20ec9673716e9dcc0ce55a93e26be0060c744257651a5fa5fe224dd3064e9031/matplotlib/matplotlib/issues/10161 |
| og:image:alt | 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,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhoffm |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width