Add typing to pyplot.show() to avoid errors with `mypy --strict`. by hhoppe · Pull Request #1 · hhoppe/matplotlib · GitHub
Skip to content

Add typing to pyplot.show() to avoid errors with mypy --strict. - #1

Closed
hhoppe wants to merge 1 commit into
mainfrom
hhoppe-patch-1
Closed

hhoppe wants to merge 1 commit into
mainfrom
hhoppe-patch-1

Conversation

@hhoppe

@hhoppe hhoppe commented Sep 27, 2023

Copy link
Copy Markdown
Owner

Add type signature for pyplot.show.

PR summary

This is done to prevent errors when mypy --strict is invoked on client code containing plt.show().
Closes matplotlib#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

Added type signature for `show`.
@ksunden

ksunden commented Sep 27, 2023

Copy link
Copy Markdown

@hhoppe

hhoppe commented Sep 27, 2023

Copy link
Copy Markdown
Owner Author

@hhoppe hhoppe closed this Sep 27, 2023
@hhoppe
hhoppe deleted the hhoppe-patch-1 branch October 10, 2023 18:20
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.

[Bug]: Missing file pyplot.pyi for mypy typing

2 participants