mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 11:21:19 +08:00
Make self positional-only in functools.partial and partialmethod (#6822)
This commit is contained in:
@@ -52,7 +52,7 @@ class partial(Generic[_T]):
|
||||
args: tuple[Any, ...]
|
||||
keywords: dict[str, Any]
|
||||
def __new__(cls: Type[_S], __func: Callable[..., _T], *args: Any, **kwargs: Any) -> _S: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __call__(__self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -88,7 +88,7 @@ class _SingleDispatchCallable(Generic[_T]):
|
||||
@overload
|
||||
def register(self, cls: Type[Any], func: Callable[..., _T]) -> Callable[..., _T]: ...
|
||||
def _clear_cache(self) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __call__(__self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
|
||||
def singledispatch(func: Callable[..., _T]) -> _SingleDispatchCallable[_T]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user