Add complete annotations to builtins.compile. (#2606)

This commit is contained in:
Brandt Bucher
2018-11-20 08:48:24 -08:00
committed by Sebastian Rittau
parent 45d4e88175
commit 7685462672
3 changed files with 11 additions and 6 deletions

View File

@@ -9,9 +9,10 @@ from typing import (
Sequence, Mapping, Tuple, List, Any, Dict, Callable, Generic, Set,
AbstractSet, FrozenSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs,
SupportsComplex, SupportsRound, IO, BinaryIO, Union, AnyStr, MutableSequence, MutableMapping,
MutableSet, ItemsView, KeysView, ValuesView, Optional, Container, Type
MutableSet, ItemsView, KeysView, ValuesView, Optional, Container, Type, Text
)
from abc import ABCMeta
from ast import mod
_T = TypeVar('_T')
_T_co = TypeVar('_T_co', covariant=True)
@@ -745,7 +746,8 @@ def any(i: Iterable[object]) -> bool: ...
def bin(number: int) -> str: ...
def callable(o: object) -> bool: ...
def chr(code: int) -> str: ...
def compile(source: Any, filename: unicode, mode: str, flags: int = ...,
def compile(source: Union[Text, mod], filename: Text,
mode: Text, flags: int = ...,
dont_inherit: int = ...) -> Any: ...
def delattr(o: Any, name: unicode) -> None: ...
def dir(o: object = ...) -> List[str]: ...