ENH: Use rcParams savefig.directory on macosx backend#22180
ENH: Use rcParams savefig.directory on macosx backend#22180jklymak merged 2 commits intomatplotlib:mainfrom
Conversation
| self.canvas.remove_rubberband() | ||
|
|
||
| def save_figure(self, *args): | ||
| directory = os.path.expanduser(mpl.rcParams['savefig.directory']) |
There was a problem hiding this comment.
Is it possible to add a smoke test for this in the tests?
There was a problem hiding this comment.
Unfortunately I think this is another PR that would be quite hard to add a test for because it is using the GUI :( I did a global search and didn't see any of the other backends testing this either...
There was a problem hiding this comment.
I take that back, I just pushed up a test to hijack the GUI function and return a well-defined string instead. I think that should get codecov for the Python branches at least... Still not testing the Objective-C updates, but better than nothing?
647451d to
bd7d627
Compare
This adds the rcParams savefig.directory option into the macosx backend for the savefig dialog window.
bd7d627 to
9ed0a30
Compare
9ed0a30 to
15afb44
Compare
|
Ping for a review from any mac users that want to test this out. |
|
@dstansby / mac users, reminder for another review on this one as well.
|
PR Summary
This adds the rcParams savefig.directory option into the macosx
backend for the savefig dialog window.
Additionally cleans up some of the UTF8 string allocations in this code block.
Closes #21710
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).