Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
`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.
None
in set_prop_cycleNone
in set_prop_cycle (in type hints)There was a problem hiding this 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.
Can you also fix the docstring for |
Add `None` to the docstring as a request from the maintainers.
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? |
f017a0e
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
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. |
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