diff options
| author | Sylvain Th?nault <thenault@gmail.com> | 2014-03-26 14:20:42 +0100 |
|---|---|---|
| committer | Sylvain Th?nault <thenault@gmail.com> | 2014-03-26 14:20:42 +0100 |
| commit | 64c7cd458ed099b24a5e323eef679a9419439c08 (patch) | |
| tree | 4c077a4082b35a3b152e31cef57b5b8a9c3c6593 /builder.py | |
| parent | 1175e1a698768aeaddb37dafc916a90f15f86b7a (diff) | |
| parent | 0b64b5075802793dc68da98f9591ec927e14ffe4 (diff) | |
| download | astroid-64c7cd458ed099b24a5e323eef679a9419439c08.tar.gz | |
Merged in flyingsheep/astroid (pull request #15)
AstroidBuilder.string_build was incompatible with file_stream
Diffstat (limited to 'builder.py')
| -rw-r--r-- | builder.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -44,6 +44,7 @@ if sys.version_info >= (3, 0): def open_source_file(filename): byte_stream = open(filename, 'bU') encoding = detect_encoding(byte_stream.readline)[0] + byte_stream.close() stream = open(filename, 'U', encoding=encoding) try: data = stream.read() @@ -101,6 +102,12 @@ class AstroidBuilder(InspectBuilder): # this is a built-in module # get a partial representation by introspection node = self.inspect_build(module, modname=modname, path=path) + # we have to handle transformation by ourselves since the rebuilder + # isn't called for builtin nodes + # + # XXX it's then only called for Module nodes, not for underlying + # nodes + node = self._manager.transform(node) return node def file_build(self, path, modname=None): |
