mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
functools.singledispatchmethod: add __call__ for better results (#3899)
It doesn't actually have __call__, it does some descriptor stuff, but this makes things work. _SingleDispatchCallable has a __call__ too, which is what this mirrors. Fixes #3898
This commit is contained in:
@@ -86,6 +86,7 @@ if sys.version_info >= (3, 8):
|
||||
def register(self, cls: Any, method: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
|
||||
@overload
|
||||
def register(self, cls: Any, method: Callable[..., _T]) -> Callable[..., _T]: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
|
||||
class cached_property(Generic[_T]):
|
||||
func: Callable[[Any], _T]
|
||||
|
||||
Reference in New Issue
Block a user