From 8987ecf3a868d619a9d83ca0db4329a15993e40b Mon Sep 17 00:00:00 2001 From: David Halter Date: Tue, 8 Jan 2013 12:53:02 +0100 Subject: [PATCH] forgot some fragments of CachedModule.cache --- jedi/api.py | 3 +-- jedi/dynamic.py | 3 +-- jedi/modules.py | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/jedi/api.py b/jedi/api.py index bd2b878a..a97872dd 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -376,8 +376,7 @@ class Script(object): return None, 0 try: - timestamp, parser = builtin.CachedModule.cache[ - self.source_path] + timestamp, parser = cache.module_cache[self.source_path] except KeyError: return None, 0 part_parser = self._module.get_part_parser() diff --git a/jedi/dynamic.py b/jedi/dynamic.py index ced891cd..7a47126b 100644 --- a/jedi/dynamic.py +++ b/jedi/dynamic.py @@ -16,7 +16,6 @@ import evaluate import helpers import settings import debug -import builtin import imports import api_classes import fast_parser @@ -33,7 +32,7 @@ def get_directory_modules_for_name(mods, name): """ def check_python_file(path): try: - return builtin.CachedModule.cache[path][1].module + return cache.module_cache[path][1].module except KeyError: try: return check_fs(path) diff --git a/jedi/modules.py b/jedi/modules.py index 0a00b72d..2c66f2b0 100644 --- a/jedi/modules.py +++ b/jedi/modules.py @@ -65,10 +65,10 @@ class ModuleWithCursor(Module): """ get the parser lazy """ if not self._parser: try: - ts, parser = builtin.CachedModule.cache[self.path] + ts, parser = cache.module_cache[self.path] cache.invalidate_star_import_cache(parser.module) - del builtin.CachedModule.cache[self.path] + del cache.module_cache[self.path] except KeyError: pass # Call the parser already here, because it will be used anyways. @@ -77,7 +77,7 @@ class ModuleWithCursor(Module): self._parser = fast_parser.FastParser(self.source, self.path, self.position) if self.path is not None: - builtin.CachedModule.cache[self.path] = time.time(), \ + cache.module_cache[self.path] = time.time(), \ self._parser return self._parser