Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:mainfromhhoppe:hhoppe-patch-1
Oct 4, 2023

Conversation

hhoppe
Copy link
Contributor

Add type signature forpyplot.show.

PR summary

This is done to prevent errors whenmypy --strict is invoked on client code containingplt.show().
Closes#26919.
The signature indicates a return type ofNone, which matches the matplotlib documentation, even though the implementation could actually return non-None if the back-end function does.

PR checklist

Added type signature for `show`.
Copy link

@github-actionsgithub-actionsbot left a 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 uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

@ksunden
Copy link
Member

I could argue to do the same/similar todraw_if_interactive andnew_figure_manager (the latter would return aFigureManagerBase (which is already imported)).

@hhoppe
Copy link
ContributorAuthor

hhoppe commentedSep 28, 2023 via email

Possibly. Those function calls are likely much less frequent for thecommon 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: ***@***.***>

@oscargusoscargus added this to thev3.8.1 milestoneSep 28, 2023
@timhoffmtimhoffm merged commit6ba7d5f intomatplotlib:mainOct 4, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestOct 4, 2023
QuLogic added a commit that referenced this pull requestOct 5, 2023
…940-on-v3.8.xBackport PR#26940 on branch v3.8.x (Add typing to pyplot.show() to avoid errors with mypy --strict.)
@hhoppehhoppe deleted the hhoppe-patch-1 branchOctober 10, 2023 18:20
@ksundenksunden mentioned this pull requestNov 2, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@ksundenksundenksunden approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.8.1
Development

Successfully merging this pull request may close these issues.

[Bug]: Missing file pyplot.pyi for mypy typing
4 participants
@hhoppe@ksunden@timhoffm@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp