diff --git a/stdlib/2/ast.pyi b/stdlib/2/ast.pyi index 8261a5ef2..03682ef0c 100644 --- a/stdlib/2/ast.pyi +++ b/stdlib/2/ast.pyi @@ -1,6 +1,9 @@ # Python 2.7 ast -import typing +# Rename typing to _typing, as not to conflict with typing imported +# from _ast below when loaded in an unorthodox way by the Dropbox +# internal Bazel integration. +import typing as _typing from typing import Any, Iterator, Optional, Union from _ast import * @@ -17,7 +20,7 @@ def fix_missing_locations(node: AST) -> AST: ... def get_docstring(node: AST, clean: bool = ...) -> str: ... def increment_lineno(node: AST, n: int = ...) -> AST: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... -def iter_fields(node: AST) -> Iterator[typing.Tuple[str, Any]]: ... +def iter_fields(node: AST) -> Iterator[_typing.Tuple[str, Any]]: ... def literal_eval(node_or_string: Union[str, unicode, AST]) -> Any: ... def walk(node: AST) -> Iterator[AST]: ... diff --git a/stdlib/3/ast.pyi b/stdlib/3/ast.pyi index 181ef7950..91aab538a 100644 --- a/stdlib/3/ast.pyi +++ b/stdlib/3/ast.pyi @@ -1,7 +1,10 @@ # Python 3.5 ast -import typing -from typing import Any, Union, Iterator, Optional +# Rename typing to _typing, as not to conflict with typing imported +# from _ast below when loaded in an unorthodox way by the Dropbox +# internal Bazel integration. +import typing as _typing +from typing import Any, Iterator, Optional, Union from _ast import * @@ -19,7 +22,7 @@ def fix_missing_locations(node: AST) -> AST: ... def get_docstring(node: AST, clean: bool = ...) -> str: ... def increment_lineno(node: AST, n: int = ...) -> AST: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... -def iter_fields(node: AST) -> Iterator[typing.Tuple[str, Any]]: ... +def iter_fields(node: AST) -> Iterator[_typing.Tuple[str, Any]]: ... def literal_eval(node_or_string: Union[str, AST]) -> Any: ... def walk(node: AST) -> Iterator[AST]: ...