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 explicit getter / setter overloads for pyplot.{xlim,ylim}#30199

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

Conversation

ZPyrolink
Copy link
Contributor

PR summary

This PR update thetools/boilerplate.py for autogenerate getter / setter:

  • Axes.xlim
  • Axes.ylim
  • Any method with the following form:T.get_meth() -> TGet ;T.set_meth(...) -> TSet

PR checklist

- Create get_signature method- Create AXES_GETTER_SETTER_TEMPLATE- Create call_param method on generate_function(cherry picked from commite57b321)
(cherry picked from commit64e7921)
(cherry picked from commit66ee071)
@ZPyrolinkZPyrolink changed the titlePyplot get set automatizationPyplot getter setter automatizationJun 21, 2025
@ZPyrolinkZPyrolink mentioned this pull requestJun 21, 2025
2 tasks
@QuLogic
Copy link
Member

I don't think the docstrings are correct here. Placing them on the overloads doesn't really produce both. What you end up with is the docstring toAxes.get_xlim, which is not the same as the removed docstring forxlim. If you want to automatically produce the overloads, that might be fine, but I don't think there's a way to generate a reasonable docstring on these.

@QuLogic
Copy link
Member

Any method with the following form:T.get_meth() -> TGet ;T.set_meth(...) -> TSet

You've mentioned these as well, but it seems like this PR only changedxlim/ylim?

@timhoffm
Copy link
Member

I think the added complexity of the auto-generation is not not worth it, in particular given that we want a different docstring. As proposed in#30160 (comment) writing out the signature manually and/or adding overloads should be good enough.

@ZPyrolinkZPyrolink changed the titlePyplot getter setter automatizationAdd explicit getter / setter overloads for pyplot.{xlim,ylim}Jun 24, 2025
@QuLogicQuLogic merged commite36bffb intomatplotlib:mainJun 27, 2025
40 checks passed
@github-project-automationgithub-project-automationbot moved this fromNeeds review toWaiting for author inFirst Time ContributorsJun 27, 2025
@QuLogicQuLogic moved this fromWaiting for author toMerged inFirst Time ContributorsJun 27, 2025
@QuLogicQuLogic added this to thev3.11.0 milestoneJun 27, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
Milestone
v3.11.0
Development

Successfully merging this pull request may close these issues.

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

[8]ページ先頭

©2009-2025 Movatter.jp