diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-02-02 10:10:42 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-02-02 10:10:42 +0100 |
commit | 6ff63289e00f3e3b5054f79038cf70ad4f73ae75 (patch) | |
tree | 1a5bf67c83ebbca3ac009f12003d5f306564779c /rebuilder.py | |
parent | c8879cc2029b31f1223ddb36907b978f3aebd1ff (diff) | |
download | astroid-git-6ff63289e00f3e3b5054f79038cf70ad4f73ae75.tar.gz |
CONST_NAME_TRANSFORMS are only for compiler
--HG--
branch : rebuild
Diffstat (limited to 'rebuilder.py')
-rw-r--r-- | rebuilder.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/rebuilder.py b/rebuilder.py index 08ad3a9b..29ff8840 100644 --- a/rebuilder.py +++ b/rebuilder.py @@ -26,9 +26,6 @@ from logilab.astng.utils import ASTVisitor, REDIRECT from logilab.astng.infutils import YES, Instance -CONST_NAME_TRANSFORMS = {'None': None, - 'True': True, - 'False': False} def _check_children(node): """a helper function to check children - parent relations""" @@ -59,8 +56,6 @@ class RebuildVisitor(ASTVisitor): def visit(self, node, parent): if node is None: # some attributes of some nodes are just None return None - # TODO : parent is never used; replace by newparent ? Could - # replace set_infos or simplify some other cases ? cls_name = node.__class__.__name__ _method_suffix = REDIRECT.get(cls_name, cls_name).lower() @@ -257,13 +252,6 @@ class RebuildVisitor(ASTVisitor): self._global_names = [] return self._visit_module(node, parent) - def visit_name(self, node, parent): - """visit an Name node to become astng""" - newnode = self._visit_name(node, parent) - if newnode.name in CONST_NAME_TRANSFORMS: - return nodes.Const(CONST_NAME_TRANSFORMS[newnode.name]) - return newnode - def visit_pass(self, node, parent): """visit a Pass node by returning a fresh instance of it""" newnode = nodes.Pass() |