Add typing to pyplot.show() to avoid errors with mypy --strict.#26940
Merged
timhoffm merged 1 commit intomatplotlib:mainfrom Oct 4, 2023
Merged
Add typing to pyplot.show() to avoid errors with mypy --strict.#26940timhoffm merged 1 commit intomatplotlib:mainfrom
timhoffm merged 1 commit intomatplotlib:mainfrom
Conversation
Added type signature for `show`.
1 task
There was a problem hiding this comment.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
Member
|
I could argue to do the same/similar to |
Contributor
Author
|
Possibly. Those function calls are likely much less frequent for the
common user.
…On Wed, Sep 27, 2023, 4:25 PM Kyle Sunden ***@***.***> wrote:
I could argue to do the same/similar to draw_if_interactive and
new_figure_manager (the latter would return a FigureManagerBase (which is
already imported)).
—
Reply to this email directly, view it on GitHub
<#26940 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYGNYRLNV3AC32M7EAZVRLX4SYYJANCNFSM6AAAAAA5KCIBII>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
ksunden
approved these changes
Oct 4, 2023
timhoffm
approved these changes
Oct 4, 2023
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Oct 4, 2023
…rors with mypy --strict.
QuLogic
added a commit
that referenced
this pull request
Oct 5, 2023
…940-on-v3.8.x Backport PR #26940 on branch v3.8.x (Add typing to pyplot.show() to avoid errors with mypy --strict.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add type signature for
pyplot.show.PR summary
This is done to prevent errors when
mypy --strictis invoked on client code containingplt.show().Closes #26919.
The signature indicates a return type of
None, which matches the matplotlib documentation, even though the implementation could actually return non-None if the back-end function does.PR checklist