From 402bc092e3dc1d961c8fa202d3ce304ec40f5378 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Wed, 10 Jul 2013 12:18:41 +0200 Subject: [PATCH] Remove has_explicit_absolute_import caching --- jedi/parsing_representation.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/jedi/parsing_representation.py b/jedi/parsing_representation.py index dace3af6..2477df27 100644 --- a/jedi/parsing_representation.py +++ b/jedi/parsing_representation.py @@ -351,8 +351,6 @@ class SubModule(Scope, Module): self.use_as_parent = top_module or self - self._explicit_absolute_imports = None - def add_global(self, name): """ Global means in these context a function (subscope) which has a global @@ -397,12 +395,7 @@ class SubModule(Scope, Module): Checks if imports in this module are explicitly absolute, i.e. there is a ``__future__`` import. """ - if self._explicit_absolute_imports is not None: - return self._explicit_absolute_imports - - has_import = any(_enables_absolute_import(i) for i in self.imports) - self._explicit_absolute_imports = has_import - return has_import + return any(_enables_absolute_import(i) for i in self.imports) class Class(Scope):