diff options
author | Torsten Marek <shlomme@gmail.com> | 2014-04-25 23:43:47 +0200 |
---|---|---|
committer | Torsten Marek <shlomme@gmail.com> | 2014-04-25 23:43:47 +0200 |
commit | 0e131af59e62e3730f85699041a4785695bbe906 (patch) | |
tree | e8dcb9712819db1e5172b8c12acfdabd6926e59c /builder.py | |
parent | fad5973bcd2adcb418f8f501c3d5a08f13409707 (diff) | |
download | astroid-git-0e131af59e62e3730f85699041a4785695bbe906.tar.gz |
Add future imports to Module.future_imports.
Diffstat (limited to 'builder.py')
-rw-r--r-- | builder.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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: |