From 3060e86d4d4719bc1f8a78db917ba65ba4a30fc2 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Wed, 30 Sep 2015 12:09:28 -0700 Subject: [PATCH] add builtins/2.7/functools.pyi --- builtins/2.7/functools.pyi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 builtins/2.7/functools.pyi diff --git a/builtins/2.7/functools.pyi b/builtins/2.7/functools.pyi new file mode 100644 index 000000000..d47086b11 --- /dev/null +++ b/builtins/2.7/functools.pyi @@ -0,0 +1,12 @@ +from typing import Any, Callable + +_T = TypeVar("T") +def reduce(function: Callable[[_T], _T], + sequence: Iterator[_T], initial=Optional[_T]) -> _T: ... + +class partial(object): + func = ... # Callable[..., Any] + args = ... # type: Tuple[Any] + keywords = ... # type: Dict[str, Any] + def __init__(self, func: Callable[..., Any], *args, **kwargs) -> None: ... + def __call__(self, *args, **kwargs) -> Any: ...