Conversation
ksunden
left a comment
There was a problem hiding this comment.
I have some concerns about the game of whack-a-mole here, we clearly do not do this validation on most of the set_* methods.
But, adding to all would be a much larger task, and has performance considerations as well. And this one has proven to be problematic, in at least one instance, so not too upset at adding it here.
If it weren't for Artist.set() and **kwargs on __init__ expanding to set_* methods, I'd argue that this job is actually pretty well handled by type checking... But those are two pretty massive holes (as well as, of course, type checking being optional).
|
Yeah, I was browsing the other setters in |
…700-on-v3.8.x Backport PR #26700 on branch v3.8.x (Check type for set_clip_box)
PR summary
Related to #26522
Check the type before comparison to avoid non-informative errors.
PR checklist