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

AllowNone in set_prop_cycle (in type hints)#29920

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 2 commits intomatplotlib:mainfromvnmabus:patch-1
Apr 17, 2025

Conversation

vnmabus
Copy link
Contributor

PR summary

set_prop_cycle allows to passNone for resetting the cycle, but with the current type hints, type checkers give an error for this case.

PR checklist

`set_prop_cycle` allows to pass `None` for resetting the cycle, but with the current type hints, type checkers give an error for this case.
@vnmabusvnmabus changed the titleAllowNone in set_prop_cycleAllowNone in set_prop_cycle (in type hints)Apr 15, 2025
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.

@QuLogic
Copy link
Member

Can you also fix the docstring forset_prop_cycle? It has a type of only~.cycler.Cycler (and should getor None as well), which is probably where this type hint came from. (Though it does mentionNone in the description.)

Add `None` to the docstring as a request from the maintainers.
@vnmabus
Copy link
ContributorAuthor

Can you also fix the docstring forset_prop_cycle? It has a type of only~.cycler.Cycler (and should getor None as well), which is probably where this type hint came from. (Though it does mentionNone in the description.)

I just did that. Maybe in the future it would make sense to add the types directly to the code (instead of using stubs) and remove the types from the docstrings, because these are not checked and can be easily out of sync with the actual types. Sphinx can add the types to the generated docs if you do it that way, and if you want to preserve the current presentation format maybe that can be done through a Sphinx plugin. What is the official stance of Matplotlib on this?

@QuLogicQuLogic added this to thev3.10.2 milestoneApr 17, 2025
@timhoffmtimhoffm merged commitf017a0e intomatplotlib:mainApr 17, 2025
41 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestApr 17, 2025
@timhoffm
Copy link
Member

When introducing typing, we decided to go with type stubs for several reasons. I would not say that this is set in stone forever, but there are currently no plans to change it.

@ksundenksunden mentioned this pull requestMay 9, 2025
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

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

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

Successfully merging this pull request may close these issues.

3 participants
@vnmabus@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp