(self, parent: Any, return_: ast.Return)
Replace return with exception raising.
Replace return with exception raising.
Replace return with exception raising .
def _replace_return(self, parent: Any, return_: ast.Return) -> None:
        """Replace return with exception raising."""
        index = parent.body.index(return_)
        parent.body.pop(index)

        for line in return_from_generator.get_body(return_value=return_.value)[::-1]:
            parent.body.insert(index, line)
def _replace_return ( self , parent : Any , return_ : ast . Return ) -> None : index = parent . body . index ( return_ ) parent . body . pop ( index ) for line in return_from_generator . get_body ( return_value = return_ . value ) [ : : - 1 ] : parent . body . insert ( index , line )