MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_configdir

Function get_configdir

lib/matplotlib/__init__.py:603–619  ·  view source on GitHub ↗

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`

()

Source from the content-addressed store, hash-verified

601
602@_logged_cached('CONFIGDIR=%s')
603def 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')

Callers 1

gen_candidatesFunction · 0.85

Calls 1

_get_config_or_cache_dirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…