mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Remove has_explicit_absolute_import caching
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user