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

Function _get_xdg_cache_dir

tools/cache_zenodo_svg.py:49–61  ·  view source on GitHub ↗

Return the XDG cache directory. See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

()

Source from the content-addressed store, hash-verified

47
48
49def _get_xdg_cache_dir():
50 """
51 Return the XDG cache directory.
52
53 See
54 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
55 """
56 cache_dir = os.environ.get("XDG_CACHE_HOME")
57 if not cache_dir:
58 cache_dir = os.path.expanduser("~/.cache")
59 if cache_dir.startswith("~/"): # Expansion failed.
60 return None
61 return Path(cache_dir, "matplotlib")
62
63
64if __name__ == "__main__":

Callers 1

download_or_cacheFunction · 0.70

Calls 2

PathClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…