summaryrefslogtreecommitdiff
path: root/astroid/builder.py
diff options
context:
space:
mode:
authorCeridwen <ceridwenv@gmail.com>2015-10-25 00:46:17 -0400
committerCeridwen <ceridwenv@gmail.com>2015-10-25 00:46:17 -0400
commit08e7be6bd61d22182b1f79d7694ac88c36becf9a (patch)
tree27e7666df8031e05006d67487f8255e6836d420e /astroid/builder.py
parentf438b0425549228fdf3a8a6b3948d503aa75e43c (diff)
downloadastroid-git-08e7be6bd61d22182b1f79d7694ac88c36becf9a.tar.gz
First draft of mock AST generation code finished
Diffstat (limited to 'astroid/builder.py')
-rw-r--r--astroid/builder.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/astroid/builder.py b/astroid/builder.py
index 9614b039..f5daee0d 100644
--- a/astroid/builder.py
+++ b/astroid/builder.py
@@ -83,7 +83,7 @@ else:
MANAGER = manager.AstroidManager()
-class AstroidBuilder(raw_building.InspectBuilder):
+class AstroidBuilder(object): # (raw_building.InspectBuilder):
"""Class for building an astroid tree from source code or from a live module.
The param *manager* specifies the manager class which should be used.
@@ -94,7 +94,7 @@ class AstroidBuilder(raw_building.InspectBuilder):
"""
def __init__(self, manager=None, apply_transforms=True):
- super(AstroidBuilder, self).__init__()
+ # super(AstroidBuilder, self).__init__()
self._manager = manager or MANAGER
self._apply_transforms = apply_transforms
@@ -109,7 +109,10 @@ class AstroidBuilder(raw_building.InspectBuilder):
if node is None:
# this is a built-in module
# get a partial representation by introspection
- node = self.inspect_build(module, modname=modname, path=path)
+ # node = self.inspect_build(module, modname=modname, path=path)
+ node = raw_building.ast_from_object(module, name=modname)
+ # FIXME
+ node.source_file = path
if self._apply_transforms:
# We have to handle transformation by ourselves since the
# rebuilder isn't called for builtin nodes