mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 10:03:32 +08:00
Drop Python 3.3 support from several stubs (#2265)
* Drop Python 3.3 support from several stubs * Revert wrong socketserver changes
This commit is contained in:
committed by
Jelle Zijlstra
parent
b05e99297c
commit
95eff73ab2
@@ -47,31 +47,30 @@ class partial(Generic[_T]):
|
||||
def __init__(self, func: Callable[..., _T], *args: Any, **kwargs: Any) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
# With protocols, this could change into a generic protocol that defines __get__ and returns _T
|
||||
_Descriptor = Any
|
||||
# With protocols, this could change into a generic protocol that defines __get__ and returns _T
|
||||
_Descriptor = Any
|
||||
|
||||
class partialmethod(Generic[_T]):
|
||||
func: Union[Callable[..., _T], _Descriptor]
|
||||
args: Tuple[Any, ...]
|
||||
keywords: Dict[str, Any]
|
||||
class partialmethod(Generic[_T]):
|
||||
func: Union[Callable[..., _T], _Descriptor]
|
||||
args: Tuple[Any, ...]
|
||||
keywords: Dict[str, Any]
|
||||
|
||||
@overload
|
||||
def __init__(self, func: Callable[..., _T], *args: Any, **keywords: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, func: _Descriptor, *args: Any, **keywords: Any) -> None: ...
|
||||
def __get__(self, obj: Any, cls: Type[Any]) -> Callable[..., _T]: ...
|
||||
@property
|
||||
def __isabstractmethod__(self) -> bool: ...
|
||||
@overload
|
||||
def __init__(self, func: Callable[..., _T], *args: Any, **keywords: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, func: _Descriptor, *args: Any, **keywords: Any) -> None: ...
|
||||
def __get__(self, obj: Any, cls: Type[Any]) -> Callable[..., _T]: ...
|
||||
@property
|
||||
def __isabstractmethod__(self) -> bool: ...
|
||||
|
||||
class _SingleDispatchCallable(Generic[_T]):
|
||||
registry = ... # type: Mapping[Any, Callable[..., _T]]
|
||||
def dispatch(self, cls: Any) -> Callable[..., _T]: ...
|
||||
@overload
|
||||
def register(self, cls: Any) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
|
||||
@overload
|
||||
def register(self, cls: Any, func: Callable[..., _T]) -> Callable[..., _T]: ...
|
||||
def _clear_cache(self) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
class _SingleDispatchCallable(Generic[_T]):
|
||||
registry = ... # type: Mapping[Any, Callable[..., _T]]
|
||||
def dispatch(self, cls: Any) -> Callable[..., _T]: ...
|
||||
@overload
|
||||
def register(self, cls: Any) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
|
||||
@overload
|
||||
def register(self, cls: Any, func: Callable[..., _T]) -> Callable[..., _T]: ...
|
||||
def _clear_cache(self) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
|
||||
def singledispatch(func: Callable[..., _T]) -> _SingleDispatchCallable[_T]: ...
|
||||
def singledispatch(func: Callable[..., _T]) -> _SingleDispatchCallable[_T]: ...
|
||||
|
||||
Reference in New Issue
Block a user