mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-21 02:22:23 +08:00
Fixed a bug where providing a cache_path did not really affect anything.
This commit is contained in:
@@ -152,8 +152,9 @@ def clear_cache(cache_path=None):
|
||||
|
||||
|
||||
def _get_hashed_path(grammar, path, cache_path=None):
|
||||
directory = _get_cache_directory_path(cache_path=cache_path)
|
||||
|
||||
file_hash = hashlib.sha256(path.encode("utf-8")).hexdigest()
|
||||
directory = _get_cache_directory_path()
|
||||
return os.path.join(directory, '%s-%s.pkl' % (grammar.sha256, file_hash))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user