summaryrefslogtreecommitdiff
path: root/builder.py
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2013-06-18 18:18:45 +0200
committerSylvain Thénault <sylvain.thenault@logilab.fr>2013-06-18 18:18:45 +0200
commit97c3f5dddd151494effe5150663f83c71e77354c (patch)
tree566cbe4ef5dfc41a23d8af3824c059b15cbe6e6a /builder.py
parentfc02b9e6bc453e0413e324c7a458b5871277744c (diff)
downloadastroid-git-97c3f5dddd151494effe5150663f83c71e77354c.tar.gz
[transforms] allow transformation functions on any nodes, not only modules
Diffstat (limited to 'builder.py')
-rw-r--r--builder.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/builder.py b/builder.py
index 42168eb5..6b80f350 100644
--- a/builder.py
+++ b/builder.py
@@ -138,9 +138,6 @@ class AstroidBuilder(InspectBuilder):
# handle delayed assattr nodes
for delayed in module._delayed_assattr:
self.delayed_assattr(delayed)
- if modname:
- for transformer in self._manager.transformers:
- transformer(module)
return module
def _data_build(self, data, modname, path):
@@ -156,7 +153,7 @@ class AstroidBuilder(InspectBuilder):
package = True
else:
package = path and path.find('__init__.py') > -1 or False
- rebuilder = TreeRebuilder()
+ rebuilder = TreeRebuilder(self._manager)
module = rebuilder.visit_module(node, modname, package)
module.file = module.path = node_file
module._from_nodes = rebuilder._from_nodes