mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-30 19:05:23 +08:00
Merge pull request #789 from blueyed/parser.utils.clear_cache-clear-self.__index
parser.utils.clear_cache: clear self.__index
This commit is contained in:
@@ -160,7 +160,6 @@ class ParserPickling(object):
|
||||
# 0 means version is not defined (= always delete cache):
|
||||
if data.get('version', 0) != self.version:
|
||||
self.clear_cache()
|
||||
self.__index = {}
|
||||
else:
|
||||
self.__index = data['index']
|
||||
return self.__index
|
||||
@@ -180,6 +179,7 @@ class ParserPickling(object):
|
||||
|
||||
def clear_cache(self):
|
||||
shutil.rmtree(self._cache_directory())
|
||||
self.__index = {}
|
||||
|
||||
def _get_hashed_path(self, path):
|
||||
return self._get_path('%s.pkl' % hashlib.md5(path.encode("utf-8")).hexdigest())
|
||||
|
||||
Reference in New Issue
Block a user