Return the string path of the configuration directory. The directory is chosen as follows: 1. If the MPLCONFIGDIR environment variable is supplied, choose that. 2. On Linux, follow the XDG specification and look first in ``$XDG_CONFIG_HOME``, if defined, or ``$HOME/.config`
()
| 601 | |
| 602 | @_logged_cached('CONFIGDIR=%s') |
| 603 | def get_configdir(): |
| 604 | """ |
| 605 | Return the string path of the configuration directory. |
| 606 | |
| 607 | The directory is chosen as follows: |
| 608 | |
| 609 | 1. If the MPLCONFIGDIR environment variable is supplied, choose that. |
| 610 | 2. On Linux, follow the XDG specification and look first in |
| 611 | ``$XDG_CONFIG_HOME``, if defined, or ``$HOME/.config``. On Windows, |
| 612 | use ``%LOCALAPPDATA%\\matplotlib``. On other platforms, choose |
| 613 | ``$HOME/.matplotlib``. |
| 614 | 3. If the chosen directory exists and is writable, use that as the |
| 615 | configuration directory. |
| 616 | 4. Else, create a temporary directory, and use it as the configuration |
| 617 | directory. |
| 618 | """ |
| 619 | return _get_config_or_cache_dir(_get_xdg_config_dir) |
| 620 | |
| 621 | |
| 622 | @_logged_cached('CACHEDIR=%s') |
no test coverage detected
searching dependent graphs…