diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2022-02-26 19:56:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 19:56:19 +0100 |
commit | a62f37ddae2d6fdb6f8ec0f2e5b6a0a41e5f883e (patch) | |
tree | 4531fff0b7ef02cb35146bb65482163bbe916625 /astroid/builder.py | |
parent | 514c832a6957c7589aa3e14973189e2e245de961 (diff) | |
download | astroid-git-a62f37ddae2d6fdb6f8ec0f2e5b6a0a41e5f883e.tar.gz |
Add position attribute for nodes (#1393)
Diffstat (limited to 'astroid/builder.py')
-rw-r--r-- | astroid/builder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/astroid/builder.py b/astroid/builder.py index 273c46e3..e4fa4ec3 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -175,7 +175,7 @@ class AstroidBuilder(raw_building.InspectBuilder): module = self._manager.visit_transforms(module) return module - def _data_build(self, data, modname, path): + def _data_build(self, data: str, modname, path): """Build tree node from data and add some information""" try: node, parser_module = _parse_string(data, type_comments=True) @@ -200,7 +200,7 @@ class AstroidBuilder(raw_building.InspectBuilder): path is not None and os.path.splitext(os.path.basename(path))[0] == "__init__" ) - builder = rebuilder.TreeRebuilder(self._manager, parser_module) + builder = rebuilder.TreeRebuilder(self._manager, parser_module, data) module = builder.visit_module(node, modname, node_file, package) module._import_from_nodes = builder._import_from_nodes module._delayed_assattr = builder._delayed_assattr |