moved cla shared axes code to a dedicated function #8710
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
Response to the end of #8455 with discussion with @WeatherGod
The goal of this PR is to clean up the code in
Axes.cla()
, which has grown to be large. We probably want something clean over something quick here. This is meant to be a very simple aesthetic change, nothing more (no logic changes).PR Checklist
PR Details
This is also just a suggestion, and there likely may be a better way. I am opening it so it does not get lost. I am open to suggestions, and if you have something nicer, feel free to create a new PR (but please reference this one so we don't get lost).
However, I believe it does bring some points of discussion that I think may be necessary to address, such as:
cla
is overridden, then_cla_shared
needs to be also removed from the class (i.e. for polar axes). Right now this would have to be manually done. I am wondering if there exist decorators implemented that take care of these? For example:where
@cla.override
would contain the necessary bookeeping to remove_cla_shared
whencla
is overridden. I will try to search more when I have time but if someone has insight I'm interested to know (and thanks for saving me time :-) ). @QuLogic might have some idea and some input with his experience with polaraxes.test/test_axes.py
contain a long list of failures (which seem to be the same with and without this change).thanks!