-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add typing to pyplot.show() to avoid errors with mypy --strict. #26940
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
Conversation
Added type signature for `show`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
I could argue to do the same/similar to |
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:
***@***.***>
|
…rors with mypy --strict.
…940-on-v3.8.x Backport PR #26940 on branch v3.8.x (Add typing to pyplot.show() to avoid errors with mypy --strict.)
Add type signature for
pyplot.show
.PR summary
This is done to prevent errors when
mypy --strict
is 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