-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
The Artist property rasterized cannot be None anymore #18989
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It is now a bool only. Before the default was non and `Artist.set_rasterized` documented to accept *None*. However, *None* did not have a special meaning and was treated as *False.
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.
Once CI passes. I agree about the lack of need to deprecate.
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.
anyone can merge when doc CI passes.
@timhoffm I took the liberty of fixing the rst typo. |
Please squash-merge after CI pass. |
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.
I guess I don't quite understand this PR. None usually means default, and the default is False. Why is all this necessary?
@@ -0,0 +1,5 @@ | |||
The Artist property *rasterized* cannot be *None* anymore | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
It is now a bool only. Before the default was non and `.Artist.set_rasterized` |
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.
It is now a bool only. Before the default was non and `.Artist.set_rasterized` | |
It is now a bool only. Before the default was *None* and `.Artist.set_rasterized` |
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.
We only use None as a default, if that default is not a simple data type (e.g. depends on rcParams
or is an object; e.g. a Norm
). If the default is a bool like here, we use that directly.
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.
Did you merge with the typo?
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.
Woops. I was so distracted by your confusion 😃. Corrected in #18996.
Self-merged based on 2 positive reviews. |
- Use correct issue number in filename - Fix typo `non` -> `None`
Fix API change message from #18989
PR Summary
It is now a bool only. Before the default was None and
Artist.set_rasterized
documented to accept None. However, Nonedid not have a special meaning and was treated as False.
This is:
set_rasterized
to accept None. However as with most bools, we just check the truthiness, so None is further accepted implicitly.get_rasterized() is None
because None has no special meaning.Because of the above I dare go without deprecation.