X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/751583a1dfc691423d96d7711a4c8d9cfe3ee9c8..bb588073ab286a9f1f8d839ab2cebe13011dd22c:/src/black/cache.py?ds=sidebyside 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