diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index e8cc5aee10f8..fe19774df801 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -25,9 +25,6 @@ _T4 = TypeVar('_T4') _T5 = TypeVar('_T5') _TT = TypeVar('_TT', bound='type') -class staticmethod: ... # Special, only valid as a decorator. -class classmethod: ... # Special, only valid as a decorator. - class object: __doc__ = ... # type: Optional[str] __class__ = ... # type: type @@ -49,6 +46,20 @@ class object: def __reduce__(self) -> tuple: ... def __reduce_ex__(self, protocol: int) -> tuple: ... +class staticmethod(object): # Special, only valid as a decorator. + __func__ = ... # type: function + + def __init__(self, f: function) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ... + +class classmethod(object): # Special, only valid as a decorator. + __func__ = ... # type: function + + def __init__(self, f: function) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ... + class type(object): __bases__ = ... # type: Tuple[type, ...] __name__ = ... # type: str diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 2b0f40249a87..0910e98605a0 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -27,9 +27,6 @@ _T4 = TypeVar('_T4') _T5 = TypeVar('_T5') _TT = TypeVar('_TT', bound='type') -class staticmethod: ... # Special, only valid as a decorator. -class classmethod: ... # Special, only valid as a decorator. - class object: __doc__ = ... # type: Optional[str] __class__ = ... # type: type @@ -57,6 +54,22 @@ class object: if sys.version_info >= (3, 6): def __init_subclass__(cls) -> None: ... +class staticmethod: # Special, only valid as a decorator. + __func__ = ... # type: function + __isabstractmethod__ = ... # type: bool + + def __init__(self, f: function) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ... + +class classmethod: # Special, only valid as a decorator. + __func__ = ... # type: function + __isabstractmethod__ = ... # type: bool + + def __init__(self, f: function) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ... + class type: __bases__ = ... # type: Tuple[type, ...] __name__ = ... # type: str