Skip to content

Accept anything that's not a directory for $MATPLOTLIBRC. #11854

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

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 15, 2018

This allows e.g. setting $MATPLOTLIBRC to /dev/null to ignore a local
matplotlibrc.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak
Copy link
Member

jklymak commented Aug 15, 2018

Presumably this could use some documentation somewhere, or is it simply meant to be a testing aid?

@anntzer anntzer force-pushed the matplotlibrcdevnull branch from 39823b0 to cd79543 Compare August 15, 2018 18:34
@anntzer
Copy link
Contributor Author

anntzer commented Aug 15, 2018

Sure, added a whatsnew (marked it :orphan: to avoid build failures until we start a new whatnew folder). The docstring of the function had already been updated.

The customizing.py tutorial says

# 2. :file:`$MATPLOTLIBRC` if it is a file, else :file:`$MATPLOTLIBRC/matplotlibrc`.

which I don't think is worth making more complicated (and technically /dev/null is a device file anyways...).

This allows e.g. setting $MATPLOTLIBRC to /dev/null to ignore a local
matplotlibrc.
@anntzer anntzer force-pushed the matplotlibrcdevnull branch from cd79543 to 71326f5 Compare August 15, 2018 18:57
@QuLogic QuLogic merged commit 8a8c881 into matplotlib:master Aug 16, 2018
@anntzer anntzer deleted the matplotlibrcdevnull branch August 16, 2018 07:09
@QuLogic QuLogic added this to the v3.1 milestone Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants