summaryrefslogtreecommitdiff
path: root/builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'builder.py')
-rw-r--r--builder.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/builder.py b/builder.py
index 0271f714..ef86ce62 100644
--- a/builder.py
+++ b/builder.py
@@ -148,6 +148,9 @@ class AstroidBuilder(InspectBuilder):
self._manager.astroid_cache[module.name] = module
# post tree building steps after we stored the module in the cache:
for from_node in module._from_nodes:
+ if from_node.modname == '__future__':
+ for symbol, _ in from_node.names:
+ module.future_imports.add(symbol)
self.add_from_names_to_locals(from_node)
# handle delayed assattr nodes
for delayed in module._delayed_assattr: