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

Pyplot explicit signature#30200

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

Open
ZPyrolink wants to merge3 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromZPyrolink:pyplot-signatures

Conversation

ZPyrolink
Copy link

@ZPyrolinkZPyrolink commentedJun 21, 2025
edited
Loading

PR summary

This PR updatelib/matplotlib/pyplot.pyto replace*args, **kwargs with the real signature for the following methods:

  • savefig
  • set_loglevel
  • polar

PR checklist

@ZPyrolinkZPyrolink changed the titlePyplot signaturesPyplot explicit signatureJun 21, 2025
Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

Minor suggestions, but I'm fine either way.

*args: float | ArrayLike | str,
scalex: bool = True,
scaley: bool = True,
data=None,
Copy link
Member

Choose a reason for hiding this comment

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

IMHO we could leave data out, because it's not typed anyway, so no advantage of writing it out.

def polar(*args, **kwargs) -> list[Line2D]:
def polar(
*args: float | ArrayLike | str,
scalex: bool = True,
Copy link
Member

Choose a reason for hiding this comment

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

I would also leavescalex,scaley out. They are an odd wart ofplot. No other plotting method has this and I'd rather not explicitly talk about it inpolar, even if this means it's not type annotated.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[MNT]: pyplot type hints
3 participants
@ZPyrolink@timhoffm@CorenthinZ

[8]ページ先頭

©2009-2025 Movatter.jp