diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-09-10 11:48:20 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-09-10 11:48:20 +0200 |
commit | 629bddb398245c0cc0c8f93b66e835ce7cc6b718 (patch) | |
tree | 9f1bfb3ce2c9fccee931063e26034f7c9d66c3dc /rebuilder.py | |
parent | 97a1dcea92a20cbf9f80069f81e73fe043d08516 (diff) | |
download | astroid-git-629bddb398245c0cc0c8f93b66e835ce7cc6b718.tar.gz |
fix astng building bug: we've to set module.package flag at the node creation time
otherwise we'll miss this information when infering relative import during
the build process (this should fix for instance some problems with numpy)
--HG--
branch : stable
Diffstat (limited to 'rebuilder.py')
-rw-r--r-- | rebuilder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rebuilder.py b/rebuilder.py index 063aad7a..d902875e 100644 --- a/rebuilder.py +++ b/rebuilder.py @@ -94,14 +94,14 @@ class RebuildVisitor(object): visit_method = getattr(self, visit_name) return visit_method(node, parent) - def build(self, node, modname, module_file): + def build(self, node, modname, module_file, package): """rebuild the tree starting with an Module node; return an astng.Module node """ self._metaclass = [''] self._global_names = [] self._from_nodes = [] - module = self.visit_module(node, modname) + module = self.visit_module(node, modname, package) module.file = module.path = module_file # init module cache here else we may get some infinite recursion # errors while infering delayed assignments |