def visit_func_def(self, node: FuncDef) -> None: if not self.recurse_into_functions: return node.expanded = [] node.type = node.unanalyzed_type with self.enter_method(node.info) if node.info else nothing(): super().visit_func_def(node)
def visit_func_def(self, node: FuncDef) -> None: if not self.recurse_into_functions: return node.expanded = [] node.type = node.unanalyzed_type with self.enter_method(node.info) if node.info else nothing(): super().visit_func_def(node)
def visit_func_def(self, node: FuncDef) -> None: if not self.recurse_into_functions: return node.expanded = [] node.type = node.unanalyzed_type # Type variable binder binds tvars before the type is analyzed. # It should be refactored, before that we just undo this change here. # TODO: this will be not necessary when #4814 is fixed. if node.type: assert isinstance(node.type, CallableType) node.type.variables = [] with self.enter_method(node.info) if node.info else nothing(): super().visit_func_def(node)
def visit_func_def(self, node: FuncDef) -> None: if not self.recurse_into_functions: return node.expanded = [] node.type = node.unanalyzed_type # Type variable binder binds tvars before the type is analyzed. # It should be refactored, before that we just undo this change here. # TODO: this will be not necessary when #4814 is fixed. if node.type: assert isinstance(node.type, CallableType) node.type.variables = [] with self.enter_method(node.info) if node.info else nothing(): super().visit_func_def(node)
def visit_func_def(self, node: FuncDef) -> None: if not self.recurse_into_functions: return node.expanded = [] node.type = node.unanalyzed_type if node.type: # Type variable binder binds type variables before the type is analyzed, # this causes unanalyzed_type to be modified in place. We needed to revert this # in order to get the state exactly as it was before semantic analysis. # See also #4814. assert isinstance(node.type, CallableType) node.type.variables = [] with self.enter_method(node.info) if node.info else nothing(): super().visit_func_def(node)
def visit_func_def(self, node: FuncDef) -> None: if not self.recurse_into_functions: return node.expanded = [] node.type = node.unanalyzed_type if node.type: # Type variable binder binds type variables before the type is analyzed, # this causes unanalyzed_type to be modified in place. We needed to revert this # in order to get the state exactly as it was before semantic analysis. # See also #4814. assert isinstance(node.type, CallableType) node.type.variables = [] with self.enter_method(node.info) if node.info else nothing(): super().visit_func_def(node)
def visit_func_def(self, node: FuncDef) -> None: node.expanded = [] node.type = node.unanalyzed_type with self.enter_class(node.info) if node.info else nothing(): super().visit_func_def(node)