Beispiel #1
0
 def visit_mypy_file(self, node: MypyFile) -> Node:
     # NOTE: The 'names' and 'imports' instance variables will be empty!
     new = MypyFile(self.nodes(node.defs), [], node.is_bom)
     new._name = node._name
     new._fullname = node._fullname
     new.path = node.path
     new.names = SymbolTable()
     return new
Beispiel #2
0
 def visit_mypy_file(self, node: MypyFile) -> Node:
     # NOTE: The 'names' and 'imports' instance variables will be empty!
     new = MypyFile(self.nodes(node.defs), [], node.is_bom)
     new._name = node._name
     new._fullname = node._fullname
     new.path = node.path
     new.names = SymbolTable()
     return new
Beispiel #3
0
 def visit_mypy_file(self, node: MypyFile) -> MypyFile:
     # NOTE: The 'names' and 'imports' instance variables will be empty!
     new = MypyFile(self.statements(node.defs), [], node.is_bom,
                    ignored_lines=set(node.ignored_lines))
     new._name = node._name
     new._fullname = node._fullname
     new.path = node.path
     new.names = SymbolTable()
     return new