diff --git a/stdlib/3/ast.pyi b/stdlib/3/ast.pyi index 7d58a80fd..8cb78fbf5 100644 --- a/stdlib/3/ast.pyi +++ b/stdlib/3/ast.pyi @@ -31,6 +31,7 @@ if sys.version_info >= (3, 8): source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: Literal["exec"] = ..., + *, type_comments: bool = ..., feature_version: Union[None, int, _typing.Tuple[int, int]] = ..., ) -> Module: ... @@ -39,6 +40,7 @@ if sys.version_info >= (3, 8): source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ..., + *, type_comments: bool = ..., feature_version: Union[None, int, _typing.Tuple[int, int]] = ..., ) -> AST: ... @@ -60,5 +62,6 @@ def increment_lineno(node: _T, n: int = ...) -> _T: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... def iter_fields(node: AST) -> Iterator[_typing.Tuple[str, Any]]: ... def literal_eval(node_or_string: Union[str, AST]) -> Any: ... -def get_source_segment(source: str, node: AST, *, padded: bool = ...) -> Optional[str]: ... +if sys.version_info >= (3, 8): + def get_source_segment(source: str, node: AST, *, padded: bool = ...) -> Optional[str]: ... def walk(node: AST) -> Iterator[AST]: ...