forked from VimPlug/jedi
caches have their own module now.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
import re
|
||||
import os
|
||||
|
||||
import cache
|
||||
import dynamic
|
||||
import helpers
|
||||
import settings
|
||||
import evaluate
|
||||
import imports
|
||||
@@ -10,6 +13,20 @@ import parsing
|
||||
import keywords
|
||||
|
||||
|
||||
def _clear_caches():
|
||||
"""
|
||||
Clears all caches of this and related modules. The only cache that will not
|
||||
be deleted is the module cache.
|
||||
"""
|
||||
cache.clear_caches()
|
||||
dynamic.search_param_cache.clear()
|
||||
helpers.ExecutionRecursionDecorator.reset()
|
||||
|
||||
evaluate.follow_statement.reset()
|
||||
|
||||
imports.imports_processed = 0
|
||||
|
||||
|
||||
class BaseDefinition(object):
|
||||
_mapping = {'posixpath': 'os.path',
|
||||
'riscospath': 'os.path',
|
||||
@@ -193,7 +210,7 @@ class Completion(BaseDefinition):
|
||||
|
||||
self._followed_definitions = \
|
||||
[BaseDefinition(d, d.start_pos) for d in defs]
|
||||
evaluate.clear_caches()
|
||||
_clear_caches()
|
||||
|
||||
return self._followed_definitions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user