Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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._fullname = node._fullname
     new.path = node.path
     new.names = SymbolTable()
     return new
Exemplo n.º 4
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
Exemplo n.º 5
0
 def visit_mypy_file(self, node: MypyFile) -> MypyFile:
     # NOTE: The 'names' and 'imports' instance variables will be empty!
     ignored_lines = {line: codes[:]
                      for line, codes in node.ignored_lines.items()}
     new = MypyFile(self.statements(node.defs), [], node.is_bom,
                    ignored_lines=ignored_lines)
     new._fullname = node._fullname
     new.path = node.path
     new.names = SymbolTable()
     return new