Exemplo n.º 1
0
 def visit_class_def(self, node: ClassDef) -> Node:
     new = ClassDef(node.name, self.block(node.defs), node.type_vars,
                    self.types(node.base_types), node.metaclass)
     new.fullname = node.fullname
     new.info = node.info
     new.decorators = [
         decorator.accept(self) for decorator in node.decorators
     ]
     new.is_builtinclass = node.is_builtinclass
     return new
Exemplo n.º 2
0
 def visit_class_def(self, node: ClassDef) -> ClassDef:
     new = ClassDef(node.name, self.block(node.defs), node.type_vars,
                    self.expressions(node.base_type_exprs), node.metaclass)
     new.fullname = node.fullname
     new.info = node.info
     new.decorators = [
         self.expr(decorator) for decorator in node.decorators
     ]
     new.is_builtinclass = node.is_builtinclass
     return new
Exemplo n.º 3
0
 def visit_class_def(self, node: ClassDef) -> Node:
     new = ClassDef(node.name, self.block(node.defs), node.type_vars,
                    self.nodes(node.base_type_exprs), node.metaclass)
     new.fullname = node.fullname
     new.info = node.info
     new.decorators = [
         decorator.accept(self) for decorator in node.decorators
     ]
     new.is_builtinclass = node.is_builtinclass
     return new
Exemplo n.º 4
0
 def visit_class_def(self, node: ClassDef) -> Node:
     new = ClassDef(node.name, self.block(node.defs), node.type_vars,
                    self.nodes(node.base_type_exprs), node.metaclass)
     new.fullname = node.fullname
     new.info = node.info
     new.base_types = []
     for base in node.base_types:
         new.base_types.append(cast(Instance, self.type(base)))
     new.decorators = [
         decorator.accept(self) for decorator in node.decorators
     ]
     new.is_builtinclass = node.is_builtinclass
     return new