From 5a3a47264f6c39264755565851bf2eac022b6f5a Mon Sep 17 00:00:00 2001 From: Shantanu Date: Sat, 16 May 2020 17:03:03 -0700 Subject: [PATCH] ast: add indent to dump in py39 (#4007) Co-authored-by: hauntsaninja <> --- stdlib/3/ast.pyi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/3/ast.pyi b/stdlib/3/ast.pyi index 11417d068..56d4dc134 100644 --- a/stdlib/3/ast.pyi +++ b/stdlib/3/ast.pyi @@ -184,7 +184,10 @@ if sys.version_info >= (3, 9): def unparse(ast_obj: AST) -> str: ... def copy_location(new_node: _T, old_node: AST) -> _T: ... -def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... +if sys.version_info >= (3, 9): + def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ..., *, indent: Union[int, str, None] = ...) -> str: ... +else: + def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... def fix_missing_locations(node: _T) -> _T: ... def get_docstring(node: AST, clean: bool = ...) -> str: ... def increment_lineno(node: _T, n: int = ...) -> _T: ...