Fix spelling error in contains_branch_separately method name#30475
Fix spelling error in contains_branch_separately method name#30475timhoffm merged 1 commit intomatplotlib:mainfrom
contains_branch_separately method name#30475Conversation
ce9ba96 to
7b37286
Compare
7b37286 to
93c4bc3
Compare
contains_branch_seperately method namecontains_branch_separately method name
|
I'll also rename the PR title, as people tend to want to open PRs to 'fix' the changelog on intentional typos. |
|
Thanks for the review, and great points! I've updated the alias to an actual method, like so: def contains_branch_seperately(self, other_transform):
"""Permanent alias for backwards compatibility (historical typo)."""
return self.contains_branch_separately(other_transform)As you note, this means we no longer need additional aliases in child classes or mixins. When I tried to remove the alias completely from contains_branch_seperately = contains_branch_separately # Alias (historical typo)And I removed the code from That seems to make CI happy, and I think that's about as minimal as it can get in |
Ah, good point, I forgot we check for consistency. This is fine as it is. |
93c4bc3 to
b478bb6
Compare
Fixes matplotlib#30474. This PR fixes a long-standing spelling error in the `contains_branch_seperately` method name, which should be `contains_branch_separately`. In order to maintain backwards compatibility, aliases maintain the old spelling for legacy use. Type hints and internal references are updated to the new spelling accordingly.
b478bb6 to
a6267f7
Compare
Fixes #30474.
PR summary
This PR fixes a long-standing spelling error in the
contains_branch_seperatelymethod name, which should becontains_branch_separately.In order to maintain backwards compatibility, aliases maintain the old spelling for legacy use. (Per discussion in #30474 with @tacaswell it was reasoned that this was preferable to deprecation.)
Type hints and internal references are updated to the new spelling accordingly.
PR checklist