8000 Move deprecation note to end of docstring by timhoffm · Pull Request #12736 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Move deprecation note to end of docstring #12736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2018

Conversation

timhoffm
Copy link
Member
@timhoffm timhoffm commented Nov 4, 2018

PR Summary

This PR moves the deprecation note, that is generated by @deprecated from the top of the docstring to the bottom.

The issue with the top position is that the first line should contain a description of the function. This place is currently taken over by the deprecation note. Tools that extract a summary sentence with thus pick up the note, e.g. autosummary:

grafik

All deprecated elements that I've checked have quite a short docstring so that there's no significant change in visibility of the deprecation note in the rendered HTML docs.

Before:
grafik

After:
grafik

Copy link
Member
@ImportanceOfBeingErnest ImportanceOfBeingErnest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Although it might also be useful to see if a function is deprecated already within the list of functions.
Might there be a solution to this?

Copy link
Contributor
@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a clear improvement. @ImportanceOfBeingErnest I'll let you open a new issue regarding your comment :) (which is reasonable, but perhaps that's the kind of things that should go to sphinx.ext.autosummary?)

@anntzer anntzer merged commit 2f796c4 into matplotlib:master Nov 4, 2018
8660
@anntzer anntzer added this to the v3.1 milestone Nov 4, 2018
@timhoffm timhoffm deleted the move-deprecation-message-down branch November 4, 2018 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0