From 025f31dcc9126ee84204b5ba1f8be95265ad98f5 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Thu, 26 Jan 2017 22:53:59 +0300 Subject: [PATCH] Added class super to builtins (#867) --- stdlib/2/__builtin__.pyi | 6 ++++++ stdlib/3/builtins.pyi | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index ba053d8c8..5c552dec2 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -205,6 +205,12 @@ class complex(SupportsAbs[float]): def __hash__(self) -> int: ... def __nonzero__(self) -> bool: ... +class super(object): + @overload + def __init__(self, t: Any, obj: Any) -> None: ... + @overload + def __init__(self, t: Any) -> None: ... + class basestring(metaclass=ABCMeta): ... class unicode(basestring, Sequence[unicode]): diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 8068890bd..742b932f6 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -72,6 +72,14 @@ class type: # implementation seems to be returning a list. def mro(self) -> List[type]: ... +class super(object): + @overload + def __init__(self, t: Any, obj: Any) -> None: ... + @overload + def __init__(self, t: Any) -> None: ... + @overload + def __init__(self) -> None: ... + class int(SupportsInt, SupportsFloat, SupportsAbs[int]): def __init__(self, x: Union[SupportsInt, str, bytes] = ..., base: int = ...) -> None: ... def bit_length(self) -> int: ...