mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
staticmethod and classmethod can wrap any callable (#2650)
Closes: #2645
This commit is contained in:
committed by
Sebastian Rittau
parent
48183b1d27
commit
98e63d2d2f
@@ -52,18 +52,18 @@ class object:
|
||||
def __reduce_ex__(self, protocol: int) -> tuple: ...
|
||||
|
||||
class staticmethod(object): # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
__func__ = ... # type: Callable
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __init__(self, f: Callable) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
|
||||
|
||||
class classmethod(object): # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
__func__ = ... # type: Callable
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __init__(self, f: Callable) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
|
||||
|
||||
class type(object):
|
||||
__bases__ = ... # type: Tuple[type, ...]
|
||||
|
||||
@@ -52,18 +52,18 @@ class object:
|
||||
def __reduce_ex__(self, protocol: int) -> tuple: ...
|
||||
|
||||
class staticmethod(object): # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
__func__ = ... # type: Callable
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __init__(self, f: Callable) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
|
||||
|
||||
class classmethod(object): # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
__func__ = ... # type: Callable
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __init__(self, f: Callable) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
|
||||
|
||||
class type(object):
|
||||
__bases__ = ... # type: Tuple[type, ...]
|
||||
|
||||
@@ -59,20 +59,20 @@ class object:
|
||||
def __init_subclass__(cls) -> None: ...
|
||||
|
||||
class staticmethod: # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
__func__ = ... # type: Callable
|
||||
__isabstractmethod__ = ... # type: bool
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __init__(self, f: Callable) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
|
||||
|
||||
class classmethod: # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
__func__ = ... # type: Callable
|
||||
__isabstractmethod__ = ... # type: bool
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __init__(self, f: Callable) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
|
||||
|
||||
class type:
|
||||
__bases__ = ... # type: Tuple[type, ...]
|
||||
|
||||
Reference in New Issue
Block a user