def visit_assignment_stmt(self, node: AssignmentStmt) -> None: node.type = node.unanalyzed_type node.is_final_def = False if self.type and not self.is_class_body: for lvalue in node.lvalues: self.process_lvalue_in_method(lvalue) super().visit_assignment_stmt(node)
def duplicate_assignment(self, node: AssignmentStmt) -> AssignmentStmt: new = AssignmentStmt(self.expressions(node.lvalues), self.expr(node.rvalue), self.optional_type(node.type)) new.line = node.line new.is_final_def = node.is_final_def return new