(self, **snippet_kwargs: Variable)
return tree.body[0].body
Get AST of snippet body with replaced variables.
Get AST of snippet body with replaced variables.
Get AST of snippet body with replaced variables .
def get_body(self, **snippet_kwargs: Variable) -> List[ast.AST]:
        """Get AST of snippet body with replaced variables."""
        source = get_source(self._fn)
        tree = ast.parse(source)
        variables = self._get_variables(tree, snippet_kwargs)
        extend_tree(tree, variables)
        VariablesReplacer.replace(tree, variables)
        return tree.body[0].body
def get_body ( self , * * snippet_kwargs : Variable ) -> List [ ast . AST ] : source = get_source ( self . _fn ) tree = ast . parse ( source ) variables = self . _get_variables ( tree , snippet_kwargs ) extend_tree ( tree , variables ) VariablesReplacer . replace ( tree , variables ) return tree . body [ 0 ] . body