X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/751583a1dfc691423d96d7711a4c8d9cfe3ee9c8..882d8795c6ff65c02f2657e596391748d1b6b7f5:/src/black/cache.py?ds=inline diff --git a/src/black/cache.py b/src/black/cache.py index 77f66cc..6baa096 100644 --- a/src/black/cache.py +++ b/src/black/cache.py @@ -1,4 +1,5 @@ """Caching of formatted files with feature-based invalidation.""" + import hashlib import os import pickle @@ -36,8 +37,9 @@ def get_cache_dir() -> Path: repeated calls. """ # NOTE: Function mostly exists as a clean way to test getting the cache directory. - default_cache_dir = user_cache_dir("black", version=__version__) + default_cache_dir = user_cache_dir("black") cache_dir = Path(os.environ.get("BLACK_CACHE_DIR", default_cache_dir)) + cache_dir = cache_dir / __version__ return cache_dir